Skip to content
This repository has been archived by the owner on Sep 15, 2019. It is now read-only.

buildJs

tones31 edited this page Oct 17, 2016 · 1 revision

Transpiles ES6 to ES5.1 using Babel, concats JS files in order, minifies them, and optionally renames the final JS file.

Example

This will take the three files, timer.js, date.js, and myApp.js, combine them into one file, myApp.min.js, minify, rename, and save it into a file path defiend in build.myApp.

var jsFiles = [
   src.assets.js + 'timer.js',
   src.assets.js + 'date.js',
   src.myApp.js + 'myApp.js'
];
return buildJs(jsFiles, build.myApp, 'myApp');
Clone this wiki locally