# 工程化
# 运行环境
browserl.ist (opens new window)
# gulp
- 使用
gulpfile.coffee
依赖插件
tnpm install coffee-script --save-dev
- 使用 gulp4 新特性 Gulp 4: The new task execution system - gulp.parallel and gulp.series (opens new window)
$ npm uninstall gulp --save-dev
$ npm install 'gulpjs/gulp.git#4.0' --save-dev
- 如果想知道插件报错,需要安装
gulp-util
如果不打印错误,那么 gulp 只会告诉你The following tasks did not complete: dev
gutil = require 'gulp-util'
# Did you forget to signal async completion?
you
# gulp-umd
文件名转为驼峰
capitalizeFilename = (file) ->
relative = file.relative
name = path.parse(relative).name
capitalName = name.replace /[-_]\D/g, (res) ->
res.charAt(1).toUpperCase()
# lest
# Server
- PM2 (opens new window) 线上启动管理 Node 服务
- nodemon (opens new window)