gulpfile

https://gulpjs.com/docs/en/getting-started/quick-start/

npm install --global gulp-cli

npm install --save-dev gulp

gulp --version

npm install -D gulp-clean-css gulp-uglify gulp-rename gulp-concat gulp-clean gulp-notify del

gulpfile.js


function defaultTask(cb) {
  // place code for your default task here
  cb();
}

exports.default = defaultTask

npm install gulp -g
npm install gulp-clean-css -g

1.css压缩 gulp-minify-css(废弃) gulp-clean-css
2.js压缩 gulp-uglify
3.js合并 gulp-concat

https://blog.csdn.net/linysuccess/article/details/102936585

https://blog.csdn.net/zyz00000000/article/details/108129728

二、本地安装gulp-minify-css
2.一、github:https://github.com/jonathanepollack/gulp-minify-cssgithub

2.二、安装:命令提示符执行 cnpm install gulp-minify-css –save-devnpm

2.三、注意:没有安装cnpm请使用 npm install gulp-minify-css –save-dev 什么是cnpm,如何安装?json

2.四、说明:–save-dev 保存配置信息至 package.json 的 devDependencies 节点。为何要保存至package.json?gul

文档更新时间: 2022-10-27 09:43   作者:admin