rimraf --A deep deletion module for node (like `rm -rf`)

cnpm install rimraf -g 
package.json 可以像下面这样配置, 这样 每次build时候 都会把原来build好的 全部删除 重新编译
{
  "name": "webpack-ensure",
  "version": "1.0.0",
  "description": "",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "build": "rimraf dist && webpack"
  },
  "author": "",
  "license": "ISC",
  "devDependencies": {
    "html-webpack-plugin": "^2.25.0",
    "webpack": "^1.14.0"
  }
}

 

posted @ 2017-06-12 11:52  _白马非马  阅读(534)  评论(0编辑  收藏  举报