上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 35 下一页
摘要: 阅读全文
posted @ 2020-06-10 11:23 EricBlog 阅读(80) 评论(0) 推荐(0) 编辑
摘要: 复制给别人项目,不需要复制 node_modules 文件, 别人收到文件,npm install 就可以 运行项目了 阅读全文
posted @ 2020-06-10 11:01 EricBlog 阅读(598) 评论(0) 推荐(0) 编辑
摘要: // 构建任务 gulp.task('default', ['htmlmin', 'cssmin', 'jsmin', 'copy']); 阅读全文
posted @ 2020-06-10 10:48 EricBlog 阅读(716) 评论(0) 推荐(0) 编辑
摘要: 如需卸载:cnpm uninstall gulp -g 如果有安装失败依赖,降低node版本为11 全局安装 gulp:npm install --global gulp 作为项目的开发依赖(devDependencies)安装:npm install --save-dev gulp 这时候会gul 阅读全文
posted @ 2020-06-10 10:46 EricBlog 阅读(1366) 评论(0) 推荐(0) 编辑
摘要: // 复制文件夹 gulp.task('copy', () => { gulp.src('./src/images/*') .pipe(gulp.dest('dist/images')); gulp.src('./src/lib/*') .pipe(gulp.dest('dist/lib')) }) 阅读全文
posted @ 2020-06-10 10:20 EricBlog 阅读(1095) 评论(2) 推荐(0) 编辑
摘要: npm install --save-dev gulp-babel @babel/core @babel/preset-env // 暂时用下面这个 npm install gulp-babel @babel/core @babel/preset-env const babel = require( 阅读全文
posted @ 2020-06-10 10:13 EricBlog 阅读(675) 评论(0) 推荐(0) 编辑
摘要: npm install gulp-less const less = require('gulp-less'); // css任务 // 1.less 语法转换 // 2.css代码压缩 gulp.task('cssmin', () => { gulp.src('./src/css/*.less') 阅读全文
posted @ 2020-06-10 09:48 EricBlog 阅读(326) 评论(0) 推荐(0) 编辑
摘要: npm install gulp-file-include 引入 const fileinclude = require('gulp-file-include') src 目录下 新建 common 目录 把公共部分剪切到 header.html 里面 引入 公共部分 多了 头部框架开始 代表成功 阅读全文
posted @ 2020-06-10 09:23 EricBlog 阅读(258) 评论(0) 推荐(0) 编辑
摘要: // 1. html文件中的代码压缩操作 // 安装 npm install gulp-htmlmin''' 引入 const htmlmin = require('gulp-htmlmin'); // 创建任务 gulp.task('htmlmin', () => { // * 代表文件下的所有h 阅读全文
posted @ 2020-06-10 09:08 EricBlog 阅读(253) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2020-06-09 21:28 EricBlog 阅读(99) 评论(0) 推荐(0) 编辑
上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 35 下一页