material-design-lite/gulpfile.babel.js

808 lines
23 KiB
JavaScript
Raw Normal View History

/**
*
2015-02-16 06:06:43 -08:00
* Material Design Lite
2015-01-06 05:36:47 -08:00
* Copyright 2015 Google Inc. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
2014-10-22 06:14:09 -07:00
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License
*
*/
// jscs:disable jsDoc
2015-12-09 09:28:40 -08:00
2014-04-17 05:02:38 -07:00
'use strict';
2014-06-19 05:14:21 -07:00
// Include Gulp & Tools We'll Use
2015-10-01 07:19:43 -07:00
import fs from 'fs';
import path from 'path';
import mergeStream from 'merge-stream';
2015-10-01 07:19:43 -07:00
import del from 'del';
2016-10-02 11:08:24 -07:00
import vinylPaths from 'vinyl-paths';
2015-10-01 07:19:43 -07:00
import runSequence from 'run-sequence';
import browserSync from 'browser-sync';
import through from 'through2';
import swig from 'swig';
import gulp from 'gulp';
import closureCompiler from 'gulp-closure-compiler';
import gulpLoadPlugins from 'gulp-load-plugins';
import uniffe from './utils/uniffe.js';
import pkg from './package.json';
const $ = gulpLoadPlugins();
const reload = browserSync.reload;
const hostedLibsUrlPrefix = 'https://code.getmdl.io';
2015-10-01 07:19:43 -07:00
const templateArchivePrefix = 'mdl-template-';
const bucketProd = 'gs://www.getmdl.io';
const bucketStaging = 'gs://mdl-staging';
const bucketCode = 'gs://code.getmdl.io';
const banner = ['/**',
2015-02-04 02:14:57 -08:00
' * <%= pkg.name %> - <%= pkg.description %>',
' * @version v<%= pkg.version %>',
2015-07-07 01:10:39 -07:00
' * @license <%= pkg.license %>',
' * @copyright 2015 Google, Inc.',
2015-07-07 01:10:39 -07:00
' * @link https://github.com/google/material-design-lite',
2015-02-04 02:14:57 -08:00
' */',
''].join('\n');
2015-10-01 07:19:43 -07:00
let codeFiles = '';
const AUTOPREFIXER_BROWSERS = [
2015-02-04 02:14:57 -08:00
'ie >= 10',
'ie_mob >= 10',
'ff >= 30',
'chrome >= 34',
'safari >= 7',
'opera >= 23',
'ios >= 7',
'android >= 4.4',
'bb >= 10'
];
2014-04-17 05:02:38 -07:00
2015-10-01 07:19:43 -07:00
const SOURCES = [
2015-09-03 19:26:49 -07:00
// Component handler
'src/mdlComponentHandler.js',
// Polyfills/dependencies
'src/third_party/**/*.js',
// Base components
'src/button/button.js',
'src/checkbox/checkbox.js',
'src/icon-toggle/icon-toggle.js',
'src/menu/menu.js',
'src/progress/progress.js',
'src/radio/radio.js',
'src/slider/slider.js',
'src/snackbar/snackbar.js',
2015-09-03 19:26:49 -07:00
'src/spinner/spinner.js',
'src/switch/switch.js',
'src/tabs/tabs.js',
'src/textfield/textfield.js',
'src/tooltip/tooltip.js',
// Complex components (which reuse base components)
'src/layout/layout.js',
'src/data-table/data-table.js',
// And finally, the ripples
'src/ripple/ripple.js'
];
2015-04-01 04:54:06 -07:00
// ***** Development tasks ****** //
2014-06-19 05:14:21 -07:00
// Lint JavaScript
gulp.task('lint', () => {
return gulp.src([
'src/**/*.js',
'gulpfile.babel.js'
])
.pipe(reload({stream: true, once: true}))
2015-02-10 05:20:01 -08:00
.pipe($.jshint())
.pipe($.jscs())
.pipe($.jshint.reporter('jshint-stylish'))
.pipe($.jscs.reporter())
.pipe($.if(!browserSync.active, $.jshint.reporter('fail')))
.pipe($.if(!browserSync.active, $.jscs.reporter('fail')));
});
2015-04-01 04:54:06 -07:00
// ***** Production build tasks ****** //
2014-06-19 05:14:21 -07:00
// Optimize Images
2015-02-04 02:14:57 -08:00
// TODO: Update image paths in final CSS to match root/images
2015-10-01 07:19:43 -07:00
gulp.task('images', () => {
2015-02-04 02:14:57 -08:00
return gulp.src('src/**/*.{svg,png,jpg}')
2015-02-24 01:11:04 -08:00
.pipe($.flatten())
2014-06-20 08:20:44 -07:00
.pipe($.cache($.imagemin({
progressive: true,
interlaced: true
})))
2015-05-06 06:39:10 -07:00
.pipe(gulp.dest('dist/images'))
2014-06-20 08:20:44 -07:00
.pipe($.size({title: 'images'}));
2014-06-19 05:14:21 -07:00
});
2015-02-04 02:14:57 -08:00
// Compile and Automatically Prefix Stylesheets (dev)
2015-10-01 07:19:43 -07:00
gulp.task('styles:dev', () => {
return gulp.src('src/**/*.scss')
2015-02-04 02:14:57 -08:00
.pipe($.sass({
precision: 10,
onError: console.error.bind(console, 'Sass error:')
}))
2015-05-07 19:01:05 -07:00
.pipe($.cssInlineImages({
webRoot: 'src'
2015-04-16 04:55:04 -07:00
}))
2015-02-04 02:14:57 -08:00
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
2015-02-05 04:39:43 -08:00
.pipe(gulp.dest('.tmp/styles'))
2015-02-04 02:14:57 -08:00
.pipe($.size({title: 'styles'}));
2014-07-08 07:53:00 -07:00
});
// Compile and Automatically Prefix Stylesheet Templates (production)
2015-10-01 07:19:43 -07:00
gulp.task('styletemplates', () => {
// For best performance, don't add Sass partials to `gulp.src`
return gulp.src('src/template.scss')
// Generate Source Maps
2015-08-06 04:39:04 -07:00
.pipe($.sourcemaps.init())
.pipe($.sass({
precision: 10,
onError: console.error.bind(console, 'Sass error:')
}))
.pipe($.cssInlineImages({webRoot: 'src'}))
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
.pipe(gulp.dest('.tmp'))
// Concatenate Styles
.pipe($.concat('material.css.template'))
2015-10-01 07:19:43 -07:00
.pipe(gulp.dest('dist'))
// Minify Styles
.pipe($.if('*.css.template', $.csso()))
.pipe($.concat('material.min.css.template'))
.pipe($.header(banner, {pkg}))
2015-10-01 07:19:43 -07:00
.pipe($.sourcemaps.write('.'))
.pipe(gulp.dest('dist'))
.pipe($.size({title: 'styles'}));
});
2015-02-04 02:14:57 -08:00
// Compile and Automatically Prefix Stylesheets (production)
2015-10-01 07:19:43 -07:00
gulp.task('styles', () => {
// For best performance, don't add Sass partials to `gulp.src`
return gulp.src('src/material-design-lite.scss')
2015-02-24 06:21:47 -08:00
// Generate Source Maps
2015-08-06 04:39:04 -07:00
.pipe($.sourcemaps.init())
2014-11-25 03:22:05 -08:00
.pipe($.sass({
precision: 10,
onError: console.error.bind(console, 'Sass error:')
}))
.pipe($.cssInlineImages({webRoot: 'src'}))
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
2014-09-03 03:47:19 -07:00
.pipe(gulp.dest('.tmp'))
2015-02-04 02:14:57 -08:00
// Concatenate Styles
.pipe($.concat('material.css'))
.pipe($.header(banner, {pkg}))
2015-10-01 07:19:43 -07:00
.pipe(gulp.dest('dist'))
2015-02-04 02:14:57 -08:00
// Minify Styles
.pipe($.if('*.css', $.csso()))
2015-02-04 02:14:57 -08:00
.pipe($.concat('material.min.css'))
.pipe($.header(banner, {pkg}))
2015-10-01 07:19:43 -07:00
.pipe($.sourcemaps.write('.'))
.pipe(gulp.dest('dist'))
.pipe($.size({title: 'styles'}));
2014-06-18 18:37:49 -07:00
});
2014-06-18 12:58:06 -07:00
2015-06-15 09:24:52 -07:00
// Only generate CSS styles for the MDL grid
2015-10-01 07:19:43 -07:00
gulp.task('styles-grid', () => {
return gulp.src('src/material-design-lite-grid.scss')
2015-06-15 09:24:52 -07:00
.pipe($.sass({
precision: 10,
onError: console.error.bind(console, 'Sass error:')
}))
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
.pipe(gulp.dest('.tmp'))
// Concatenate Styles
.pipe($.concat('material-grid.css'))
.pipe($.header(banner, {pkg}))
2015-10-01 07:19:43 -07:00
.pipe(gulp.dest('dist'))
2015-06-15 09:24:52 -07:00
// Minify Styles
.pipe($.if('*.css', $.csso()))
.pipe($.concat('material-grid.min.css'))
.pipe($.header(banner, {pkg}))
2015-10-01 07:19:43 -07:00
.pipe(gulp.dest('dist'))
2015-06-15 09:24:52 -07:00
.pipe($.size({title: 'styles-grid'}));
});
2015-09-03 19:26:49 -07:00
// Build with Google's Closure Compiler, requires Java 1.7+ installed.
2015-10-01 07:19:43 -07:00
gulp.task('closure', () => {
2015-09-03 19:26:49 -07:00
return gulp.src(SOURCES)
.pipe(closureCompiler({
compilerPath: 'node_modules/google-closure-compiler/compiler.jar',
fileName: 'material.closure.min.js',
2015-09-03 19:26:49 -07:00
compilerFlags: {
// jscs:disable requireCamelCaseOrUpperCaseIdentifiers
2015-09-03 19:26:49 -07:00
compilation_level: 'ADVANCED_OPTIMIZATIONS',
language_in: 'ECMASCRIPT6_STRICT',
language_out: 'ECMASCRIPT5_STRICT',
warning_level: 'VERBOSE'
// jscs:enable requireCamelCaseOrUpperCaseIdentifiers
2015-09-03 19:26:49 -07:00
}
}))
.pipe(gulp.dest('./dist'));
2015-09-03 19:26:49 -07:00
});
// Concatenate And Minify JavaScript
gulp.task('scripts', ['lint'], () => {
2015-09-03 19:26:49 -07:00
return gulp.src(SOURCES)
.pipe($.if(/mdlComponentHandler\.js/, $.util.noop(), uniffe()))
2015-02-04 02:14:57 -08:00
.pipe($.sourcemaps.init())
// Concatenate Scripts
.pipe($.concat('material.js'))
.pipe($.iife({useStrict: true}))
2015-10-01 07:19:43 -07:00
.pipe(gulp.dest('dist'))
2015-02-04 02:14:57 -08:00
// Minify Scripts
.pipe($.uglify({
sourceRoot: '.',
sourceMapIncludeSources: true
}))
.pipe($.header(banner, {pkg}))
2015-02-04 02:14:57 -08:00
.pipe($.concat('material.min.js'))
// Write Source Maps
2015-10-01 07:19:43 -07:00
.pipe($.sourcemaps.write('.'))
.pipe(gulp.dest('dist'))
.pipe($.size({title: 'scripts'}));
});
2015-04-01 04:54:06 -07:00
// Clean Output Directory
gulp.task('clean', () => del(['dist', '.publish']));
2015-04-01 04:54:06 -07:00
// Copy package manger and LICENSE files to dist
2015-10-01 07:19:43 -07:00
gulp.task('metadata', () => {
return gulp.src([
'package.json',
'bower.json',
'LICENSE'
])
2015-10-01 07:19:43 -07:00
.pipe(gulp.dest('dist'));
});
2015-04-01 04:54:06 -07:00
// Build Production Files, the Default Task
2015-10-01 07:19:43 -07:00
gulp.task('default', ['clean'], cb => {
2015-04-01 04:54:06 -07:00
runSequence(
['styles', 'styles-grid'],
['scripts'],
['mocha'],
cb);
});
// Build production files and microsite
2015-10-01 07:19:43 -07:00
gulp.task('all', ['clean'], cb => {
runSequence(
2015-10-18 15:56:41 -07:00
['styletemplates'],
['styles-grid', 'styles:gen'],
['scripts'],
['mocha'],
2015-10-18 15:56:41 -07:00
['assets', 'pages',
'templates', 'images', 'metadata'],
['zip'],
2015-04-01 04:54:06 -07:00
cb);
});
// ***** Testing tasks ***** //
2015-10-01 07:19:43 -07:00
gulp.task('mocha', ['styles'], () => {
return gulp.src('test/index.html')
2015-06-24 03:30:48 -07:00
.pipe($.mochaPhantomjs({reporter: 'tap'}));
});
2015-10-01 07:19:43 -07:00
gulp.task('mocha:closure', ['closure'], () => {
return gulp.src('test/index.html')
.pipe($.replace('src="../dist/material.js"',
'src="../dist/material.closure.min.js"'))
.pipe($.rename('temp.html'))
2015-10-01 07:19:43 -07:00
.pipe(gulp.dest('test'))
.pipe($.mochaPhantomjs({reporter: 'tap'}))
.on('finish', () => del.sync('test/temp.html'))
.on('error', () => del.sync('test/temp.html'));
});
gulp.task('test', [
'lint',
'mocha',
'mocha:closure'
]);
2014-04-17 05:02:38 -07:00
2015-10-01 07:19:43 -07:00
gulp.task('test:visual', () => {
browserSync({
2014-06-25 15:14:19 -07:00
notify: false,
2015-10-01 07:19:43 -07:00
server: '.',
2015-04-01 04:54:06 -07:00
startPath: 'test/visual/index.html'
2014-06-20 08:20:44 -07:00
});
2014-04-17 05:02:38 -07:00
gulp.watch('test/visual/**', reload);
2014-04-17 05:02:38 -07:00
});
2014-06-07 10:38:49 -07:00
2015-04-01 04:54:06 -07:00
// ***** Landing page tasks ***** //
/**
* Site metadata for use with templates.
* @type {Object}
*/
2015-10-01 07:19:43 -07:00
const site = {};
2015-04-01 04:54:06 -07:00
/**
* Generates an HTML file based on a template and file metadata.
*/
function applyTemplate() {
2015-10-01 07:19:43 -07:00
return through.obj((file, enc, cb) => {
const data = {
site,
2015-04-01 04:54:06 -07:00
page: file.page,
content: file.contents.toString()
};
Build boilerplate for microsite commit d2da95318bd4ebe394ba05ec2bc0547dcabeb06b Merge: ecf5cf7 b2e7d87 Author: Alexander Surma <surma@surmair.de> Date: Wed Apr 29 10:55:52 2015 +0100 Merge branch 'master' into microsite Conflicts: docs/_templates/layout.html commit ecf5cf7508737072d174e83bd22b5704976934c9 Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 28 13:50:20 2015 +0100 Fix max-width for template listing commit 78a64d264077854755075e6fc9f950d02c2a9c23 Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 28 13:49:17 2015 +0100 Put index.md click handlers in separate JS file commit e1faa43e1680cf12978bea33c07fbf91d7e3fc2e Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 28 12:05:54 2015 +0100 Turn dt into one-liner commit eb683be5271029a7b95c70a15d7e7a19067bfc68 Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 28 12:05:33 2015 +0100 Add TODO to index.md commit bb89b1bbd0c6458a0a550d945bdcf6ba2e8fb83e Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 28 12:04:13 2015 +0100 Fix template listing commit 0daecfb80f7c2a03d2ab24004fe412c16942f14e Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 28 11:59:23 2015 +0100 Optimize SVGs in microsite commit a1d05be3be0222ac11f13931044b88e4e957b1a2 Merge: 4bbebf0 b5a1abd Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 17:53:55 2015 +0100 Merge branch 'master' into microsite Conflicts: docs/_pages/index.md docs/_templates/layout.html commit 4bbebf0971239c3e91aca7832d6d0e4e079aaf1c Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 17:47:04 2015 +0100 Make about page panels clickable commit b8ca6d11af5cfebec03207bf9d501bfc5a07f8d0 Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 17:25:31 2015 +0100 Define own template for templates listing commit 4d7ed02486ee410c7142165f2743ab84e5611ec2 Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 17:17:40 2015 +0100 Start template page commit 3431192bcfd636a04e9279191f92d1ac21893f56 Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 15:37:56 2015 +0100 Add pages commit ce540db478d99af1a60299a66f57e44c5c20579f Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 15:14:41 2015 +0100 Add header images for subpages commit 6313ccdc69845cb941b2ba71cb0dbe651e8f672f Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 13:19:46 2015 +0100 Update SVGs for consistent sizing commit deeb99fb048b7cd0e2dacb5172640c5679db7cf4 Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 13:19:40 2015 +0100 Use grid commit 097b3b30c33b3e9d6ad9726e84c7ee0e37dfd1ed Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 12:02:26 2015 +0100 Fix box-shadow on header commit 1acf79698917e05fd289bcfea09ea596205611b5 Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 21 18:00:18 2015 +0100 Add actual hover pictures to microsite commit 4be107e481c61f3eead1b5e121b6f7b80c53a480 Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 21 16:23:55 2015 +0100 Implement landing page commit 8aa6eb86dd231a17b1fb0576a71f944d38f87980 Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 20 16:46:26 2015 +0100 Implement layout commit 63504ea1754f017d3a4788b392f61fc113b7d4e4 Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 20 16:13:51 2015 +0100 Make gulp.watch() work properly with microsite
2015-04-29 03:00:31 -07:00
2015-10-01 07:19:43 -07:00
const templateFile = path.join(
__dirname, 'docs', '_templates', `${file.page.layout}.html`);
const tpl = swig.compileFile(templateFile, {cache: false});
file.contents = new Buffer(tpl(data));
cb(null, file);
2015-06-01 07:20:14 -07:00
});
2015-04-01 04:54:06 -07:00
}
/**
* Generates an index.html file for each README in MDL/src directory.
*/
2015-10-01 07:19:43 -07:00
gulp.task('components', ['demos'], () => {
return gulp.src('src/**/README.md', {base: 'src'})
2015-04-01 04:54:06 -07:00
// Add basic front matter.
.pipe($.header('---\nlayout: component\nbodyclass: component\ninclude_prefix: ../../\n---\n\n'))
.pipe($.frontMatter({
property: 'page',
remove: true
}))
2015-04-01 04:54:06 -07:00
.pipe($.marked())
2015-10-01 07:19:43 -07:00
.pipe((() => {
return through.obj((file, enc, cb) => {
2015-04-01 04:54:06 -07:00
file.page.component = file.relative.split('/')[0];
2015-10-01 07:19:43 -07:00
cb(null, file);
2015-06-01 07:20:14 -07:00
});
2015-04-01 04:54:06 -07:00
})())
.pipe(applyTemplate())
2015-10-01 07:19:43 -07:00
.pipe($.rename(path => path.basename = 'index'))
2015-05-06 06:25:08 -07:00
.pipe(gulp.dest('dist/components'));
});
2015-04-01 04:54:06 -07:00
/**
* Copies demo files from MDL/src directory.
*/
2015-10-01 07:19:43 -07:00
gulp.task('demoresources', () => {
return gulp.src([
2015-10-01 07:19:43 -07:00
'src/**/demos.css',
'src/**/demo.css',
'src/**/demo.js'
], {base: 'src'})
.pipe($.if('*.scss', $.sass({
precision: 10,
onError: console.error.bind(console, 'Sass error:')
})))
.pipe($.cssInlineImages({webRoot: 'src'}))
.pipe($.if('*.css', $.autoprefixer(AUTOPREFIXER_BROWSERS)))
.pipe(gulp.dest('dist/components'));
2014-06-07 10:38:49 -07:00
});
2015-02-16 01:15:59 -08:00
/**
* Generates demo files for testing made of all the snippets and the demo file
* put together.
*/
2015-10-01 07:19:43 -07:00
gulp.task('demos', ['demoresources'], () => {
/**
* Retrieves the list of component folders.
*/
function getComponentFolders() {
2015-10-01 07:19:43 -07:00
return fs.readdirSync('src')
.filter(file => fs.statSync(path.join('src', file)).isDirectory());
}
2015-10-01 07:19:43 -07:00
const tasks = getComponentFolders().map(component => {
return gulp.src([
2015-10-01 07:19:43 -07:00
path.join('src', component, 'snippets', '*.html'),
path.join('src', component, 'demo.html')
])
.pipe($.concat('/demo.html'))
// Add basic front matter.
.pipe($.header('---\nlayout: demo\nbodyclass: demo\ninclude_prefix: ../../\n---\n\n'))
.pipe($.frontMatter({
property: 'page',
remove: true
}))
.pipe($.marked())
2015-10-01 07:19:43 -07:00
.pipe((() => {
return through.obj((file, enc, cb) => {
file.page.component = component;
cb(null, file);
});
})())
.pipe(applyTemplate())
2015-10-01 07:19:43 -07:00
.pipe(gulp.dest(path.join('dist', 'components', component)));
});
return mergeStream(tasks);
});
2015-04-01 04:54:06 -07:00
/**
* Generates an HTML file for each md file in _pages directory.
*/
2015-10-01 07:19:43 -07:00
gulp.task('pages', ['components'], () => {
return gulp.src('docs/_pages/*.md')
.pipe($.frontMatter({
property: 'page',
remove: true
}))
2015-04-01 04:54:06 -07:00
.pipe($.marked())
.pipe(applyTemplate())
2015-06-16 06:33:52 -07:00
.pipe($.replace('$$version$$', pkg.version))
.pipe($.replace('$$hosted_libs_prefix$$', hostedLibsUrlPrefix))
.pipe($.replace('$$template_archive_prefix$$', templateArchivePrefix))
/* Replacing code blocks class name to match Prism's. */
2015-06-15 09:36:58 -07:00
.pipe($.replace('class="lang-', 'class="language-'))
/* Translate html code blocks to "markup" because that's what Prism uses. */
2015-06-15 09:36:58 -07:00
.pipe($.replace('class="language-html', 'class="language-markup'))
2015-10-01 07:19:43 -07:00
.pipe($.rename(path => {
2015-04-01 04:54:06 -07:00
if (path.basename !== 'index') {
path.dirname = path.basename;
path.basename = 'index';
}
}))
2015-05-06 06:25:08 -07:00
.pipe(gulp.dest('dist'));
2015-04-01 04:54:06 -07:00
});
/**
* Copies assets from MDL and _assets directory.
*/
2015-10-01 07:19:43 -07:00
gulp.task('assets', () => {
return gulp.src([
'docs/_assets/**/*',
'node_modules/clippy/build/clippy.swf',
'node_modules/swfobject-npm/swfobject/src/swfobject.js',
'node_modules/prismjs/prism.js',
'node_modules/prismjs/components/prism-markup.min.js',
'node_modules/prismjs/components/prism-javascript.min.js',
'node_modules/prismjs/components/prism-css.min.js',
'node_modules/prismjs/components/prism-bash.min.js',
'node_modules/prismjs/dist/prism-default/prism-default.css'
])
.pipe($.if(/\.js/i, $.replace('$$version$$', pkg.version)))
.pipe($.if(/\.js/i, $.replace('$$hosted_libs_prefix$$', hostedLibsUrlPrefix)))
Build boilerplate for microsite commit d2da95318bd4ebe394ba05ec2bc0547dcabeb06b Merge: ecf5cf7 b2e7d87 Author: Alexander Surma <surma@surmair.de> Date: Wed Apr 29 10:55:52 2015 +0100 Merge branch 'master' into microsite Conflicts: docs/_templates/layout.html commit ecf5cf7508737072d174e83bd22b5704976934c9 Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 28 13:50:20 2015 +0100 Fix max-width for template listing commit 78a64d264077854755075e6fc9f950d02c2a9c23 Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 28 13:49:17 2015 +0100 Put index.md click handlers in separate JS file commit e1faa43e1680cf12978bea33c07fbf91d7e3fc2e Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 28 12:05:54 2015 +0100 Turn dt into one-liner commit eb683be5271029a7b95c70a15d7e7a19067bfc68 Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 28 12:05:33 2015 +0100 Add TODO to index.md commit bb89b1bbd0c6458a0a550d945bdcf6ba2e8fb83e Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 28 12:04:13 2015 +0100 Fix template listing commit 0daecfb80f7c2a03d2ab24004fe412c16942f14e Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 28 11:59:23 2015 +0100 Optimize SVGs in microsite commit a1d05be3be0222ac11f13931044b88e4e957b1a2 Merge: 4bbebf0 b5a1abd Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 17:53:55 2015 +0100 Merge branch 'master' into microsite Conflicts: docs/_pages/index.md docs/_templates/layout.html commit 4bbebf0971239c3e91aca7832d6d0e4e079aaf1c Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 17:47:04 2015 +0100 Make about page panels clickable commit b8ca6d11af5cfebec03207bf9d501bfc5a07f8d0 Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 17:25:31 2015 +0100 Define own template for templates listing commit 4d7ed02486ee410c7142165f2743ab84e5611ec2 Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 17:17:40 2015 +0100 Start template page commit 3431192bcfd636a04e9279191f92d1ac21893f56 Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 15:37:56 2015 +0100 Add pages commit ce540db478d99af1a60299a66f57e44c5c20579f Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 15:14:41 2015 +0100 Add header images for subpages commit 6313ccdc69845cb941b2ba71cb0dbe651e8f672f Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 13:19:46 2015 +0100 Update SVGs for consistent sizing commit deeb99fb048b7cd0e2dacb5172640c5679db7cf4 Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 13:19:40 2015 +0100 Use grid commit 097b3b30c33b3e9d6ad9726e84c7ee0e37dfd1ed Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 27 12:02:26 2015 +0100 Fix box-shadow on header commit 1acf79698917e05fd289bcfea09ea596205611b5 Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 21 18:00:18 2015 +0100 Add actual hover pictures to microsite commit 4be107e481c61f3eead1b5e121b6f7b80c53a480 Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 21 16:23:55 2015 +0100 Implement landing page commit 8aa6eb86dd231a17b1fb0576a71f944d38f87980 Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 20 16:46:26 2015 +0100 Implement layout commit 63504ea1754f017d3a4788b392f61fc113b7d4e4 Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 20 16:13:51 2015 +0100 Make gulp.watch() work properly with microsite
2015-04-29 03:00:31 -07:00
.pipe($.if(/\.(svg|jpg|png)$/i, $.imagemin({
progressive: true,
interlaced: true
})))
.pipe($.if(/\.css/i, $.autoprefixer(AUTOPREFIXER_BROWSERS)))
2015-07-02 12:31:50 -07:00
.pipe($.if(/\.css/i, $.csso()))
2015-10-01 07:19:43 -07:00
.pipe($.if(/\.js/i, $.uglify({
preserveComments: 'some',
sourceRoot: '.',
sourceMapIncludeSources: true
})))
2015-05-06 06:25:08 -07:00
.pipe(gulp.dest('dist/assets'));
2015-04-01 04:54:06 -07:00
});
/**
* Defines the list of resources to watch for changes.
*/
2015-07-22 08:24:59 -07:00
function watch() {
gulp.watch(['src/**/*.js', '!src/**/README.md'],
['scripts', 'demos', 'components', reload]);
gulp.watch(['src/**/*.{scss,css}'],
['styles', 'styles-grid', 'styletemplates', reload]);
gulp.watch(['src/**/*.html'], ['pages', reload]);
gulp.watch(['src/**/*.{svg,png,jpg}'], ['images', reload]);
gulp.watch(['src/**/README.md'], ['pages', reload]);
gulp.watch(['templates/**/*'], ['templates', reload]);
gulp.watch(['docs/**/*'], ['pages', 'assets', reload]);
gulp.watch(['package.json', 'bower.json', 'LICENSE'], ['metadata']);
}
2015-04-01 04:54:06 -07:00
/**
* Serves the landing page from "out" directory.
*/
2015-10-01 07:19:43 -07:00
gulp.task('serve:browsersync', () => {
2015-03-23 08:56:23 -07:00
browserSync({
notify: false,
2015-04-01 04:54:06 -07:00
server: {
baseDir: ['dist']
2015-04-01 04:54:06 -07:00
}
2015-03-23 08:56:23 -07:00
});
2015-07-22 08:24:59 -07:00
watch();
2015-03-23 08:56:23 -07:00
});
2015-04-15 07:13:10 -07:00
2015-10-01 07:19:43 -07:00
gulp.task('serve', () => {
$.connect.server({
root: 'dist',
2015-06-05 10:07:09 -07:00
port: 5000,
livereload: true
});
2015-07-22 08:24:59 -07:00
watch();
2015-06-05 10:07:09 -07:00
2015-10-01 07:19:43 -07:00
gulp.src('dist/index.html')
.pipe($.open({uri: 'http://localhost:5000'}));
});
// Generate release archive containing just JS, CSS, Source Map deps
2015-10-01 07:19:43 -07:00
gulp.task('zip:mdl', () => {
return gulp.src([
'dist/material?(.min)@(.js|.css)?(.map)',
'LICENSE',
'bower.json',
'package.json'
])
.pipe($.zip('mdl.zip'))
.pipe(gulp.dest('dist'));
});
2015-09-07 03:12:59 -07:00
/**
* Returns the list of children directories inside the given directory.
* @param {string} dir the parent directory
2015-09-07 03:50:59 -07:00
* @return {Array<string>} list of child directories
2015-09-07 03:12:59 -07:00
*/
function getSubDirectories(dir) {
return fs.readdirSync(dir)
2015-10-01 07:19:43 -07:00
.filter(file => fs.statSync(path.join(dir, file)).isDirectory());
}
// Generate release archives containing the templates and assets for templates.
2015-10-01 07:19:43 -07:00
gulp.task('zip:templates', () => {
const templates = getSubDirectories('dist/templates');
// Generate a zip file for each template.
2015-10-01 07:19:43 -07:00
const generateZips = templates.map(template => {
return gulp.src([
`dist/templates/${template}/**/*.*`,
'LICENSE'
])
2015-10-01 07:19:43 -07:00
.pipe($.rename(path => {
path.dirname = path.dirname.replace(`dist/templates/${template}`, '');
}))
.pipe($.zip(`${templateArchivePrefix}${template}.zip`))
.pipe(gulp.dest('dist'));
});
return mergeStream(generateZips);
});
gulp.task('zip', [
'zip:templates',
'zip:mdl'
]);
2015-10-01 07:19:43 -07:00
gulp.task('genCodeFiles', () => {
return gulp.src([
'dist/material.*@(js|css)?(.map)',
'dist/mdl.zip',
`dist/${templateArchivePrefix}*.zip`
], {read: false})
2015-10-01 07:19:43 -07:00
.pipe($.tap(file => {
codeFiles += ` dist/${path.basename(file.path)}`;
2015-07-05 11:17:45 -07:00
}));
});
// Push the latest version of code resources (CSS+JS) to Google Cloud Storage.
// Public-read objects in GCS are served by a Google provided and supported
// global, high performance caching/content delivery network (CDN) service.
// This task requires gsutil to be installed and configured.
// For info on gsutil: https://cloud.google.com/storage/docs/gsutil.
2015-10-01 07:19:43 -07:00
gulp.task('pushCodeFiles', () => {
const dest = bucketCode;
console.log(`Publishing ${pkg.version} to CDN (${dest})`);
// Build cache control and gsutil cmd to copy
// each object into a GCS bucket. The dest is a version specific path.
// The gsutil -m option requests parallel copies.
// The gsutil -h option is used to set metadata headers
// (cache control, in this case).
// Code files should NEVER be touched after uploading, therefore
// 30 days caching is a safe value.
2015-10-01 07:19:43 -07:00
const cacheControl = '-h "Cache-Control:public,max-age=2592000"';
const gsutilCpCmd = 'gsutil -m cp -z js,css,map ';
const gsutilCacheCmd = `gsutil -m setmeta -R ${cacheControl}`;
// Upload the goodies to a separate GCS bucket with versioning.
// Using a sep bucket avoids the risk of accidentally blowing away
// old versions in the microsite bucket.
return gulp.src('')
.pipe($.shell([
`${gsutilCpCmd}${codeFiles} ${dest}/${pkg.version}`,
`${gsutilCacheCmd} ${dest}/${pkg.version}`
]));
});
2015-10-01 07:19:43 -07:00
gulp.task('publish:code', cb => {
2015-07-05 11:17:45 -07:00
runSequence(
2015-07-06 03:55:11 -07:00
['zip:mdl', 'zip:templates'],
2015-07-05 11:17:45 -07:00
'genCodeFiles',
'pushCodeFiles',
cb);
});
/**
* Function to publish staging or prod version from local tree,
* or to promote staging to prod, per passed arg.
* @param {string} pubScope the scope to publish to.
*/
2015-06-25 03:34:00 -07:00
function mdlPublish(pubScope) {
2015-10-01 07:19:43 -07:00
let cacheTtl = null;
let src = null;
let dest = null;
2015-06-25 03:34:00 -07:00
if (pubScope === 'staging') {
// Set staging specific vars here.
2015-06-25 03:34:00 -07:00
cacheTtl = 0;
src = 'dist/*';
2015-06-25 03:34:00 -07:00
dest = bucketStaging;
} else if (pubScope === 'prod') {
// Set prod specific vars here.
cacheTtl = 60;
src = 'dist/*';
2015-06-25 03:34:00 -07:00
dest = bucketProd;
} else if (pubScope === 'promote') {
// Set promote (essentially prod) specific vars here.
cacheTtl = 60;
src = `${bucketStaging}/*`;
2015-06-25 03:34:00 -07:00
dest = bucketProd;
2015-04-15 07:13:10 -07:00
}
let infoMsg = `Publishing ${pubScope}/${pkg.version} to GCS (${dest})`;
if (src) {
infoMsg += ` from ${src}`;
}
console.log(infoMsg);
// Build gsutil commands:
// The gsutil -h option is used to set metadata headers.
// The gsutil -m option requests parallel copies.
2015-07-01 05:55:47 -07:00
// The gsutil -R option is used for recursive file copy.
const cacheControl = `-h "Cache-Control:public,max-age=${cacheTtl}"`;
const gsutilCacheCmd = `gsutil -m setmeta ${cacheControl} ${dest}/**`;
const gsutilCpCmd = `gsutil -m cp -r -z html,css,js,svg ${src} ${dest}`;
gulp.src('').pipe($.shell([gsutilCpCmd, gsutilCacheCmd]));
}
// Push the local build of the MDL microsite and release artifacts to the
// production Google Cloud Storage bucket for general serving to the web.
// Public-read objects in GCS are served by a Google provided and supported
// global, high performance caching/content delivery network (CDN) service.
// This task requires gsutil to be installed and configured.
// For info on gsutil: https://cloud.google.com/storage/docs/gsutil.
//
2015-10-01 07:19:43 -07:00
gulp.task('publish:prod', () => {
2015-06-25 03:34:00 -07:00
mdlPublish('prod');
});
// Promote the staging version of the MDL microsite and release artifacts
// to the production Google Cloud Storage bucket for general serving.
// Public-read objects in GCS are served by a Google provided and supported
// global, high performance caching/content delivery network (CDN) service.
// This task requires gsutil to be installed and configured.
// For info on gsutil: https://cloud.google.com/storage/docs/gsutil.
//
2015-10-01 07:19:43 -07:00
gulp.task('publish:promote', () => {
2015-06-25 03:34:00 -07:00
mdlPublish('promote');
});
// Push the staged version of the MDL microsite and release artifacts
// to a production Google Cloud Storage bucket for staging and pre-production testing.
//
// This task requires gsutil to be installed and configured.
// For info on gsutil: https://cloud.google.com/storage/docs/gsutil.
//
2015-10-01 07:19:43 -07:00
gulp.task('publish:staging', () => {
2015-06-25 03:34:00 -07:00
mdlPublish('staging');
});
2015-10-01 07:19:43 -07:00
gulp.task('_release', () => {
return gulp.src([
'dist/material?(.min)@(.js|.css)?(.map)',
'LICENSE',
'README.md',
'bower.json',
'package.json',
'.jscsrc',
'.jshintrc',
'./sr?/**/*',
'gulpfile.babel.js',
'./util?/**/*'
])
2015-07-21 06:05:50 -07:00
.pipe(gulp.dest('_release'));
});
2015-10-01 07:19:43 -07:00
gulp.task('publish:release', ['_release'], () => {
2015-07-21 06:05:50 -07:00
return gulp.src('_release')
.pipe($.subtree({
remote: 'origin',
branch: 'release'
}))
.pipe(vinylPaths(del));
2015-07-21 06:05:50 -07:00
});
2015-10-01 07:19:43 -07:00
gulp.task('templates:styles', () => {
return gulp.src('templates/**/*.css')
2015-05-13 07:59:31 -07:00
.pipe($.autoprefixer(AUTOPREFIXER_BROWSERS))
// FIXME: This crashes. It's a bug in gulp-csso,
// not csso itself.
//.pipe($.csso())
.pipe(gulp.dest('dist/templates'));
2015-04-16 03:37:38 -07:00
});
Implement template mock commit 148adbdf504565443830c8f77c789bc89074f7d2 Author: Alexander Surma <surma@surmair.de> Date: Wed Apr 15 14:15:06 2015 +0100 Correct colors in dashboard template commit 4fc7e2c3b28074612a7d24011e0414178955dbd9 Merge: f0f7d1c b18bf33 Author: Alexander Surma <surma@surmair.de> Date: Wed Apr 15 13:19:54 2015 +0100 Merge branch 'master' into templates commit f0f7d1c1159ce945e5fb8650da76c1e5b097be41 Author: Alexander Surma <surma@surmair.de> Date: Wed Apr 15 13:19:02 2015 +0100 Finalize dashboard layout commit 7ab7a6bf8962d4a758c195bf2e9c7aecb64c0d1b Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 14 18:05:03 2015 +0100 Add pie graphs commit 96382d2686df654f98c5f03f0d6eb7288ba5252e Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 14 12:54:12 2015 +0100 Started working on dashboard commit 7a260c823976d61a09f7c593d02cbf2dc2503e4f Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 13 13:34:47 2015 +0100 Finish blog entry page commit db3070c0501e49e9179a66b2477dec2aa94f5f1a Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 13 12:42:07 2015 +0100 Fix templates for new mdl prefix commit 843b0bea91d0c374d592355e31e9013e1930495f Merge: 9c71cc0 db6017c Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 13 12:18:12 2015 +0100 Merge branch 'master' into templates commit 9c71cc0d5480b0f8f6854767b72239ed9cbd475f Author: Alexander Surma <surma@surmair.de> Date: Mon Apr 13 12:17:00 2015 +0100 Add blog entry page commit 05dde46555ec1b2b0562457a192a866154704665 Author: Alexander Surma <surma@surmair.de> Date: Fri Apr 10 18:42:00 2015 +0100 Turn more button white commit 61ab09b38936e44a887af54c138b0d2c79c26610 Author: Alexander Surma <surma@surmair.de> Date: Fri Apr 10 18:38:54 2015 +0100 Add logo and images commit 7267b875f11ed2cbf5de138670d27ae49053dffb Author: Alexander Surma <surma@surmair.de> Date: Fri Apr 10 16:38:35 2015 +0100 Add more button commit f2cf6d0b68cdad60acd41294ef392b4594ecf605 Author: Alexander Surma <surma@surmair.de> Date: Fri Apr 10 16:30:38 2015 +0100 Add remaining cards commit 5fd82f181b112e0009101a35d476c124ce406c7a Author: Alexander Surma <surma@surmair.de> Date: Fri Apr 10 16:12:54 2015 +0100 Add more cards commit ce62e69125a8aed9c67e3b76663c3c16fca13fc4 Author: Alexander Surma <surma@surmair.de> Date: Fri Apr 10 14:38:21 2015 +0100 Started working on blog template commit 32e31e0137e0dae8cdfe7fdf7c86fba19c477756 Author: Alexander Surma <surma@surmair.de> Date: Thu Apr 9 18:17:11 2015 +0100 Use new primary/accent color classes commit 414f4078adc195568f27be13065e6a5e2d3dce6b Merge: 2523e8a 27f5476 Author: Alexander Surma <surma@surmair.de> Date: Thu Apr 9 17:55:00 2015 +0100 Merge branch 'master' into templates commit 2523e8a407db0174a8131504586b670cc04bd0d7 Author: Alexander Surma <surma@surmair.de> Date: Thu Apr 9 12:23:16 2015 +0100 Make general template responsive commit 48927021d04afb37dd9be4579eaf7b8b206dbe70 Author: Alexander Surma <surma@surmair.de> Date: Thu Apr 9 11:39:17 2015 +0100 Add actual assets commit a02a55e45f7b4a7add85de39e06b7671ae935677 Author: Alexander Surma <surma@surmair.de> Date: Wed Apr 8 17:54:57 2015 +0100 Add footer commit c9e31217fdbb5bb95660a19b596ee4b47dfe5002 Author: Alexander Surma <surma@surmair.de> Date: Wed Apr 8 15:46:49 2015 +0100 Add authors commit 5de43fd61ec3bf179cbde484a0408eb2412d048c Author: Alexander Surma <surma@surmair.de> Date: Wed Apr 8 15:24:47 2015 +0100 Add CTA commit 9698fbfc30889a2f16fbaa697bda21baab0d53fb Author: Alexander Surma <surma@surmair.de> Date: Wed Apr 8 15:16:10 2015 +0100 Make squares responsive commit d760292427269cf3358fd2fb96c23863c3f141e4 Author: Alexander Surma <surma@surmair.de> Date: Wed Apr 8 14:47:05 2015 +0100 Implement cards commit dc55919517cc8f4936f20ad4df82ef9b3b0ada0d Author: Alexander Surma <surma@surmair.de> Date: Wed Apr 8 13:03:24 2015 +0100 Implement FAB button commit 1bdcb0b799b31c4d57ffe0479699a84953dc42d6 Author: Alexander Surma <surma@surmair.de> Date: Wed Apr 8 11:48:45 2015 +0100 Implement nav bar commit 43e4b52d45575654587cf0ab95ffc83f17bf21b9 Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 7 18:04:07 2015 +0100 Started working on general template commit 595699051d96c7f1fb03c60f276d0ee3b39a214e Merge: bbd844f afad365 Author: Alexander Surma <surma@surmair.de> Date: Tue Apr 7 15:47:36 2015 +0100 Merge branch 'master' into templates commit bbd844f4d0428337b5555e13c07fdca9d8717f92 Author: Alexander Surma <surma@surmair.de> Date: Thu Mar 26 14:06:44 2015 +0000 Regenerate styles with appropriate contrast colors commit 088a2ee36e571a027a7e1b68ee5e98d52e2b7cc9 Author: Alexander Surma <surma@surmair.de> Date: Wed Mar 25 18:57:24 2015 +0000 Add spacing commit fcede809eb598a8fa76935d3ec2dda88887d67a2 Author: Alexander Surma <surma@surmair.de> Date: Wed Mar 25 16:18:52 2015 +0000 Implement first review commit eccc842f7bad474a0231ae7af379bbd601fa10b2 Author: Alexander Surma <surma@surmair.de> Date: Tue Mar 24 18:59:35 2015 +0000 Add some cards commit 5943b879136c184ba1d62456c9fb99da0fe4f6ef Author: Alexander Surma <surma@surmair.de> Date: Tue Mar 24 18:29:45 2015 +0000 Write first draft of starter template
2015-04-15 09:09:28 -07:00
2015-10-01 07:19:43 -07:00
gulp.task('templates:static', () => {
return gulp.src('templates/**/*.html')
.pipe($.replace('$$version$$', pkg.version))
.pipe($.replace('$$hosted_libs_prefix$$', hostedLibsUrlPrefix))
2015-05-06 06:25:08 -07:00
.pipe(gulp.dest('dist/templates'));
2015-04-16 03:37:38 -07:00
});
// This task can be used if you want to test the templates against locally
// built version of the MDL libraries.
2015-10-01 07:19:43 -07:00
gulp.task('templates:localtestingoverride', () => {
return gulp.src('templates/**/*.html')
.pipe($.replace('$$version$$', '.'))
.pipe($.replace('$$hosted_libs_prefix$$', ''))
.pipe(gulp.dest('dist/templates'));
});
2015-10-01 07:19:43 -07:00
gulp.task('templates:images', () => {
return gulp.src('templates/*/images/**/*')
.pipe($.imagemin({
progressive: true,
interlaced: true
}))
.pipe(gulp.dest('dist/templates'));
2015-04-16 03:37:38 -07:00
});
2015-10-01 07:19:43 -07:00
gulp.task('templates:fonts', () => {
return gulp.src('templates/*/fonts/**/*')
.pipe(gulp.dest('dist/templates/'));
2015-06-01 07:20:14 -07:00
});
2015-04-16 04:20:01 -07:00
gulp.task('templates', [
'templates:static',
'templates:images',
'templates:fonts',
'templates:styles'
]);
2015-10-01 07:19:43 -07:00
gulp.task('styles:gen', ['styles'], () => {
const MaterialCustomizer = require('./docs/_assets/customizer.js');
const templatePath = path.join(__dirname, 'dist', 'material.min.css.template');
// TODO: This task needs refactoring once we turn MaterialCustomizer
// into a proper Node module.
2015-10-01 07:19:43 -07:00
const mc = new MaterialCustomizer();
mc.template = fs.readFileSync(templatePath).toString();
2015-10-01 07:19:43 -07:00
let stream = gulp.src('');
2015-10-01 07:19:43 -07:00
mc.paletteIndices.forEach(primary => {
mc.paletteIndices.forEach(accent => {
if (primary === accent) {
return;
}
if (mc.forbiddenAccents.indexOf(accent) !== -1) {
return;
}
2015-10-01 07:19:43 -07:00
const primaryName = primary.toLowerCase().replace(' ', '_');
const accentName = accent.toLowerCase().replace(' ', '_');
stream = stream.pipe($.file(
`material.${primaryName}-${accentName}.min.css`,
mc.processTemplate(primary, accent)
));
});
});
2015-10-01 07:19:43 -07:00
stream.pipe(gulp.dest('dist'));
});