博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
ionic3 压缩
阅读量:6161 次
发布时间:2019-06-21

本文共 4372 字,大约阅读时间需要 14 分钟。

hot3.png

minify

https://www.npmjs.com/package/ionic-minify

https://github.com/Kurtz1993/ionic-minify/blob/master/lib/IonicMinifyConfigurations.d.ts#L92

https://github.com/Kurtz1993/ionic-minify/blob/master/lib/IonicMinifyConfigurations.d.ts#L92

 

 

cnpm install ionic-minify --save-dev

cnpm run ionic:build --prod

package.json

"scripts": {    "clean": "ionic-app-scripts clean",    "build": "ionic-app-scripts build",    "lint": "ionic-app-scripts lint",    "ionic:build": "ionic-app-scripts build",    "ionic:serve": "ionic-app-scripts serve",    "minify": "ionic-app-scripts minify",    "uglify-js": "git+https://github.com/mishoo/UglifyJS2.git#harmony"  },

 minify-conf.json

{    "foldersToProcess": [      "js",      "css",      "img"    ],    "jpgOptions":{      "quality": 50    },    "jsOptions": {      "compress": {        "drop_console": true      }    },    "cssOptions": {      "keepSpecialComments": 0    },    "alwaysRun": false,    "showErrStack": false}
cnpm install ionic-minify --save-devE:\01.code\git\ionic\myapp>cnpm install ionic-minify --save-dev√ Installed 1 packages√ Linked 234 latest versions  √ mozjpeg pre-build test passed successfully  √ pngout pre-build test passed successfullyCreating directory: E:\01.code\git\ionic\myapp\hooks\after_prepareCopying minifier file to project's hooks/after_prepare...Copying configuration file to project's hooks/ folder...Updating hooks directory to have execution permissions...It appears that you have already installed chalk...It appears that you have already installed clean-css...It appears that you have already installed mozjpeg-stream...It appears that you have already installed ng-annotate...It appears that you have already installed pngout-bin...It appears that you have already installed shelljs...It appears that you have already installed uglify-js...Ionic minify has been installed successfully! :)√ Run 4 scriptsdeprecate ionic-minify@2.0.10 › pngout-bin@2.0.1 › bin-wrapper@2.1.3 › globby@1.2.0 › glob@4.5.3 › minimatch@^2.0.1 Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issuedeprecate ionic-minify@2.0.10 › pngout-bin@2.0.1 › bin-wrapper@2.1.3 › download@3.3.0 › vinyl-fs@0.3.14 › glob-watcher@0.0.6 › gaze@0.5.2 › globule@0.1.0 › minimatch@~0.2.11 Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issuedeprecate ionic-minify@2.0.10 › pngout-bin@2.0.1 › bin-wrapper@2.1.3 › download@3.3.0 › vinyl-fs@0.3.14 › glob-watcher@0.0.6 › gaze@0.5.2 › globule@0.1.0 › glob@3.1.21 › graceful-fs@~1.2.0 graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.Recently updated (since 2017-07-26): 5 packages (detail see file E:\01.code\git\ionic\myapp\node_modules\.recently_updates.txt)  Today:    → ionic-minify@2.0.10 › mozjpeg-stream@1.0.2 › mozjpeg@4.1.1 › bin-wrapper@3.0.2 › download@4.4.3 › vinyl-fs@2.4.4 › duplexify@^3.2.0(3.5.1) (04:44:06)√ All packages installed (215 packages installed from npm registry, used 11s, speed 102.92kB/s, json 235(330.75kB), tarball 850.62kB)E:\01.code\git\ionic\myapp>E:\01.code\git\ionic\myapp>E:\01.code\git\ionic\myapp>cnpm run ionic:build --prodE:\01.code\git\ionic\myapp>cnpm run ionic:build --prod> myapp@0.0.1 ionic:build E:\01.code\git\ionic\myapp> ionic-app-scripts build[11:21:09]  ionic-app-scripts 2.1.0[11:21:09]  build prod started ...[11:21:09]  clean started ...[11:21:09]  clean finished in less than 1 ms[11:21:09]  copy started ...[11:21:09]  ngc started ...[11:21:19]  ngc finished in 9.71 s[11:21:19]  preprocess started ...[11:21:19]  deeplinks started ...[11:21:19]  deeplinks finished in 344 ms[11:21:19]  optimization started ...[11:21:20]  copy finished in 10.47 s[11:21:29]  optimization finished in 10.37 s[11:21:29]  preprocess finished in 10.71 s[11:21:29]  webpack started ...[11:21:58]  webpack finished in 28.59 s[11:21:58]  sass started ...[11:21:58]  webpack started ...[11:21:58]  uglifyjs started ...[11:22:28]  uglifyjs finished in 29.45 s[11:22:28]  webpack finished in 29.78 s[11:22:28]  sass finished in 29.94 s[11:22:28]  cleancss started ...[11:22:29]  cleancss finished in 515 ms[11:22:29]  postprocess started ...[11:22:29]  postprocess finished in 6 ms[11:22:29]  lint started ...[11:22:29]  build prod finished in 79.51 s

 

转载于:https://my.oschina.net/yizhichao/blog/1499372

你可能感兴趣的文章
华为eNSP模拟器上实现FTP服务
查看>>
【全球AI人才排行榜】美国第一,中国仅排名第7
查看>>
微信小程序输入框input
查看>>
MySql字符串函数使用技巧
查看>>
Doc2Vec,Word2Vec文本相似度 初体验。
查看>>
系统ghost后变成一个盘了别的分区的文件怎么找回
查看>>
Win7+Ubuntu11
查看>>
请问华为三层交换机里面的那个从IP是个什么意思? -
查看>>
kFeedback开源啦
查看>>
大数据传输,文件传输的专业解决方案!
查看>>
阿里云专家穆轩的《杭州九年程序员之“修炼”手册》
查看>>
JQuery:deferred对象的方法
查看>>
eyoucms问答 百度权重是什么
查看>>
win10中遇到qq视频时摄像头打不开没反应的解决方法
查看>>
介绍自己的一个Android插桩热修复框架项目QuickPatch
查看>>
关于textarea的ie9的maxlength不起作用的问题,请参考如下URL解决。
查看>>
Solr Facet 查询
查看>>
C++类的继承一
查看>>
数据库分库分表(sharding)系列(五) 一种支持自由规划无须数据迁移和修改路由代码的Sharding扩容方案...
查看>>
巧用VMware Workstation的clone来制作虚拟机模板
查看>>