Naveen Bisht
How to bundling(Script and CSS) in Angular JS? If i am not using angular with MVC project, i am using with plan HTML page.
By Naveen Bisht in Angular on Jun 30 2016
  • Mahesh Verma
    Feb, 2018 12

    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.

    • 0
  • Niraj Sharma
    Nov, 2017 3

    use gulp to bundle the js and css files

    • 0


Most Popular Job Functions


MOST LIKED QUESTIONS