mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
33 lines
707 B
JavaScript
33 lines
707 B
JavaScript
var gulp = require( 'gulp' ),
|
|
stylus = require( 'gulp-stylus' ),
|
|
nib = require( 'nib' ),
|
|
watch = require( 'gulp-watch' ),
|
|
vulcan = require( 'gulp-vulcanize' );
|
|
|
|
var paths = {
|
|
style: './elements/*.styl'
|
|
}
|
|
|
|
function compileCSS( files ) {
|
|
return files
|
|
.pipe( stylus( { use: [ nib() ] } ) )
|
|
.pipe( gulp.dest( './elements/' ) );
|
|
}
|
|
|
|
gulp.task( 'default', function() {
|
|
|
|
compileCSS( gulp.src( paths.style ) );
|
|
|
|
gulp.src( './index.html' )
|
|
.pipe( vulcan( {
|
|
dest: 'build',
|
|
inline: true,
|
|
strip: true
|
|
} ) );
|
|
|
|
|
|
} );
|
|
|
|
gulp.task( 'watch', function() {
|
|
watch( { glob: paths.style }, compileCSS );
|
|
} ); |