Browse Source

Moved Babel options to .babelrc

master
Futago-za Ryuu 4 years ago
parent
commit
92f1798308
  1. 15
      .babelrc
  2. 2
      gulpfile.js
  3. 9
      test/server/run

15
.babelrc

@ -0,0 +1,15 @@
{
"comments": false,
"compact": false,
"presets": [
[
"env",
{
"modules": false,
"targets": {
"ie": 9
}
}
]
]
}

2
gulpfile.js

@ -74,7 +74,7 @@ task( "build:browser", () => {
`;
return browserify( "lib/peg.js", { standalone: "peg" } )
.transform( babelify, { presets: "env", compact: false } )
.transform( babelify )
.bundle()
.pipe( source( "peg.js" ) )
.pipe( header( HEADER ) )

9
test/server/run

@ -17,13 +17,8 @@ app.use( "/examples", express.static( `${ __dirname }/../../examples` ) );
app.get( "/:dir/bundle.js", ( req, res ) => {
browserify( glob.sync(
`${ __dirname }/../${ req.params.dir }/**/*.js`
) )
.transform( babelify, {
presets: "env",
compact: false
} )
browserify( glob.sync( `${ __dirname }/../${ req.params.dir }/**/*.js` ) )
.transform( babelify )
.bundle()
.pipe( res );

Loading…
Cancel
Save