mirror of
https://github.com/dataarts/dat.gui.git
synced 2024-12-12 04:08:27 +00:00
add browser sync
This commit is contained in:
parent
df7c8c160f
commit
129596cb56
14
gulpfile.js
14
gulpfile.js
@ -31,6 +31,16 @@ gulp.task( 'watch', [ 'default' ], function() {
|
||||
|
||||
} );
|
||||
|
||||
gulp.task( 'serve', [], function() {
|
||||
browserSync.init( null, {
|
||||
browser: [ 'google-chrome', 'google chrome' ], // linux uses the -
|
||||
server: {
|
||||
baseDir: [ '..' ]
|
||||
},
|
||||
startPath: '/dat.gui/'
|
||||
} );
|
||||
} );
|
||||
|
||||
gulp.task( 'build', [ 'vulcanize' ], function() {
|
||||
|
||||
return gulp.src( 'build/gui.html' )
|
||||
@ -51,7 +61,7 @@ gulp.task( 'vulcanize', [ 'css' ], function() {
|
||||
inline: true,
|
||||
strip: true
|
||||
} ) )
|
||||
// clean up some vulcanize ...
|
||||
// clean up some vulcanize ...
|
||||
.pipe( $.replace( /\n\n/gm, '' ) )
|
||||
.pipe( $.replace( /<!-- .* -->/gm, '' ) )
|
||||
.pipe( $.replace( /^<div hidden>undefined<\/div>\n/gm, '' ) )
|
||||
@ -85,7 +95,7 @@ gulp.task( 'css', function() {
|
||||
} );
|
||||
|
||||
gulp.task( 'shim', function() {
|
||||
|
||||
|
||||
return gulp.src( paths.shim )
|
||||
.pipe( $.uglify() )
|
||||
.pipe( $.rename( 'gui.shim.js' ) )
|
||||
|
Loading…
Reference in New Issue
Block a user