grunt加密js遇到的小问题(grunt-cachebuster、grunt-contrib-obfuscator)

首先在项目中放入node_modules、package.js、Gruntfile修改完相应的属性以后,输入grunt开始对文件加密,这时候问题就来了,可能会遇到如下问题:
grunt加密js遇到的小问题(grunt-cachebuster、grunt-contrib-obfuscator)_第1张图片
这个问题说明有有个包或者插件不存在,所以他加密不成功,解决方案:
npm install grunt-cachebuster --save-dev但是又有型的问题出现了
grunt加密js遇到的小问题(grunt-cachebuster、grunt-contrib-obfuscator)_第2张图片
但是再运行的时候就是这个结果了:
grunt加密js遇到的小问题(grunt-cachebuster、grunt-contrib-obfuscator)_第3张图片
输入npm install grunt-contrib-obfuscator --save-dev
grunt加密js遇到的小问题(grunt-cachebuster、grunt-contrib-obfuscator)_第4张图片
不要着急,好像是还有问题,但是当你再执行grunt时候,就会这样
grunt加密js遇到的小问题(grunt-cachebuster、grunt-contrib-obfuscator)_第5张图片
惊不惊喜,意不意外,加密成功了,第一次用加密,希望可以帮到和我一样刚开始学习的小白们。

你可能感兴趣的:(grunt加密js遇到的小问题(grunt-cachebuster、grunt-contrib-obfuscator))