You can use Grunt also :For Grunt, follow these steps : Step 1: install node.js from http://nodejs.org/ Step 2: open window command prompt as admin and then run command npm install -g grunt-cli (this command will set grunt in system path to run grunt globally, then we can run grunt from any directory) Step 3: Create package.json and Gruntfile.js in root of portal project where you want to setup grunt. Step 4: Now go in project directory from command prompt then run command npm install -g grunt-init (this command will create node_modules folder in project where all plugin will store) Step 5: install packages or plugin npm install grunt --save-dev npm install grunt-contrib-clean --save-dev npm install grunt-contrib-copy --save-dev npm install grunt-contrib-concat --save-dev npm install grunt-contrib-cssmin --save-dev npm install grunt-contrib-uglify --save-dev npm install grunt-usemin --save-dev npm install grunt-contrib-watch –save-dev Step 6: open index file of project in VS where we have setup grunt. Place all script with in below tag // all script here Step 7: Run grunt in cmd Command: grunt Step 8: after run grunt all file will be merge in a single file in dist/js/build.js Step 9: Now give reference only build.js in index file and remove all other script reference from index file.
use gulp to bundle the js and css files