Skip to content

Instantly share code, notes, and snippets.

@benaadams
Last active August 29, 2015 14:27
Show Gist options
  • Select an option

  • Save benaadams/6f58e889c9069dfce560 to your computer and use it in GitHub Desktop.

Select an option

Save benaadams/6f58e889c9069dfce560 to your computer and use it in GitHub Desktop.
Gulp for Web + Win10
gulp.task( 'javascript-world', function () {
var dest = "./" + project.webroot + '/lib/';
return gulp.src( ['src/scripts/world-*.js'] )
// Concat to single file
.pipe( concat( 'world.js' ) )
// Add Byte order mark
.pipe( addBOM() )
// output for Win10 UWP App
.pipe( gulp.dest( '../IllyriadGames.Illyriad.Javascript/lib/' ) )
// pre-gzip for web
.pipe( gzip( { append: false, gzipOptions: { level: 9 } } ) )
// change extension to detect content-encoding header is needed
.pipe( extname( { ext: 'jsgz' } ) )
// output for web
.pipe( gulp.dest( dest ) )
} );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment