Browse Source

Use bare option with browserify

master
Futago-za Ryuu 5 years ago
parent
commit
6d25da2d2b
  1. 12
      gulpfile.js

12
gulpfile.js

@ -72,6 +72,14 @@ task( "build:parser", cb => {
// Create the browser build.
task( "build:browser", () => {
const options = {
bare: true,
standalone: "peg",
suffix: ".min",
};
const HEADER = dedent`
/**
@ -88,13 +96,13 @@ task( "build:browser", () => {
`;
return browserify( "lib/peg.js", { standalone: "peg" } )
return browserify( "lib/peg.js", options )
.transform( babelify )
.bundle()
.pipe( source( "peg.js" ) )
.pipe( header( HEADER ) )
.pipe( gulp.dest( "browser" ) )
.pipe( rename( { suffix: ".min" } ) )
.pipe( rename( options ) )
.pipe( buffer() )
.pipe( uglify() )
.pipe( header( HEADER ) )

Loading…
Cancel
Save