gulp: stream building tools.
npm run gulp
图片压缩npm run gulpWatch
watch图片压缩npm run gulpWebp
图片转成webp
-
Node.js' package for gulp(local): package.json
-
npm run gulp
-
npm run gulp -- browserSync
BrowserSync利用WebSocket,当监控的文件MD5发生变化时,向客户端发送刷新页面指令。
-
npm run gulp -- delRelease
-
npm run gulp -- watch
- By using gulp first time, error always occurred because of the bad network when we installed plug-ins.
- Some plug-ins depend on fsevents which is only for macOS will fail when installed by cnpm 😢. Try nrm to change registry then use npm.
- If shit happened, we should have to uninstall then install the problem plug-ins.
-
-
Gulp settings for tasks: gulpfile.js
BrowserSync is working with AJAX. Blocking AJAX will stop browserSync, such as Mock.js.
-
Do not
watch
too many files(such as node_modules folder), to avoid checking too many files so that the watch task will take huge time. -
.eslintrc.js is for ESLint.
-
.babelrc is for Babel.
-
.editorconfig is for IDEs' editor.
-
Handlebars settings for spritesmith
When install error occurs, please try cnpm or yarn.