just minify ionic source code with shell script
### Command description ```js # Command Desc # -i install module only if it does not exist. # -f install module whether exists or not. # -c copy **01_jshint.js** file to ./hooks/before_prepare/ only if it does not exist. # -m copy **01_jshint.js** file to ./hooks/before_prepare/ whether exists or not. ```1、download the minifying.sh to your project folder and make sure to give it execute permissions if you’re using Linux or Mac
2、download 01_jshint.js and move it to somewhere as you like.
3、run command like below:
./minifying.sh -i jshint -i async -i cordova-uglify -c ../01_jshint.js- if you uglify the source code, you should make sure that the modules' pathes that
uglify.jsdepends on are creact, or you will get some error like below:
module.js:327
throw err;
^
Error: Cannot find module 'src/to/project/node_modules/cordova-uglify/node_modules/1/uglify-js'What you should do is below:
1、 Download the 01_minify.js and 02_jshint.js and put them to hooks/before_prepare/ folder under your project.
2、Make sure to give the both files execute permissions if you're using Linux or Mac
* You should make sure that the number in the *minify.js* file is less than *jshint.js* file, you can find *01* is less than *02* above.
* Make sure to give them execu permission