Skip to content

Commit

Permalink
NEW: Add ES6 support for vendor scripts using gulp-babel 💯
Browse files Browse the repository at this point in the history
  • Loading branch information
asharirfan committed Jan 12, 2018
1 parent ee58fc3 commit 8a1bc78
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,17 @@ gulp.task( 'styles', function() {
*/
gulp.task( 'vendorsJS', function() {
return gulp.src( config.jsVendorSRC )
.pipe(
babel({
presets: [
[ 'env', // Preset which compiles ES6 to ES5.
{
'targets': { 'browsers': config.BROWSERS_LIST }, // Target browser list to support.
}
]
]
})
)
.pipe( concat( config.jsVendorFile + '.js' ) )
.pipe( lineec() ) // Consistent Line Endings for non UNIX systems.
.pipe( gulp.dest( config.jsVendorDestination ) )
Expand Down

0 comments on commit 8a1bc78

Please sign in to comment.