dat.gui/gulpfile.js

48 lines
843 B
JavaScript
Raw Normal View History

/*
[ ] build without polymer bundled
*/
2014-08-15 22:04:51 +00:00
var gulp = require( 'gulp' ),
stylus = require( 'gulp-stylus' ),
nib = require( 'nib' ),
watch = require( 'gulp-watch' ),
vulcan = require( 'gulp-vulcanize' );
var paths = {
style: 'elements/**/*.styl'
2014-08-15 16:32:49 +00:00
}
2014-08-15 22:04:51 +00:00
function compileCSS( files ) {
return files
.pipe( stylus( { use: [ nib() ] } ) )
.pipe( gulp.dest( 'elements' ) );
2014-08-15 22:04:51 +00:00
}
gulp.task( 'styles', function() {
2014-08-15 22:04:51 +00:00
compileCSS( gulp.src( paths.style ) );
} );
gulp.task( 'vulcanize', function() {
gulp.src( 'index.html' )
2014-08-15 22:04:51 +00:00
.pipe( vulcan( {
dest: 'build',
inline: true,
strip: true
} ) );
} );
gulp.task( 'watch', function() {
2014-08-15 22:04:51 +00:00
watch( { glob: paths.style }, compileCSS );
} );
gulp.task( 'default', [ 'styles', 'vulcanize' ]);