This gives a walk through of how to use grunt packages for css, js minification and combine scripts and how to use processhtml
Before going forward, you need to have following packages installed on your system
- nodejs(npm which gettting installed with nodejs)
- bower (if you don't have installed you can insatlled using
npm install -g bower
) - grunt (if you don't have installed you can insatlled using
npm install -g grunt-cli
)
-
clone dir(script-combine)
-
cd in cloned dir(script-combine)
-
run following command (which will install node packages in project dir)
npm install
- Now run following command to install frontend dependencies
bower install
-
Now go to
localhost/dir/app
It will show you simple html file with two css and js files loaded which are not minified -
Run following command to combine js and css files
grunt
you will find new js and css and index.html file created in dist folder
- you can view it here
localhost/dir/dist