Skip to content

Commit

Permalink
修改手动清除缓存功能
Browse files Browse the repository at this point in the history
  • Loading branch information
lilinsen committed May 7, 2019
1 parent 475aeb7 commit 5aac968
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"dev:demo": "cross-env NODE_ENV=development webpack-dev-server -d --open --progress --config build/webpack.demo.dev.conf.js",
"build:demo": "cross-env NODE_ENV=production webpack --hide-modules --progress --config build/webpack.demo.build.conf.js",
"dev:doc": "cross-env NODE_ENV=development DOC_TYPE=true webpack-dev-server -d --open -w --progress --config build/webpack.doc.dev.conf.js",
"doc:clear": "node scripts/clearCache.js",
"clear": "node scripts/clearCache.js",
"dev": "npm run dev:demo",
"dev:carefree": "cross-env NODE_ENV=carefree carefree_env=dev webpack -w --colors --progress --config build/webpack.demo.dev.conf.js",
"build:doc": "cross-env NODE_ENV=production DOC_TYPE=true webpack --hide-modules --progress --config build/webpack.doc.build.conf.js",
Expand Down
4 changes: 2 additions & 2 deletions scripts/clearcache.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const fs = require('fs');
const path = require('path');
fs.writeFileSync(path.join(__dirname,'./localdocs.cache'),"",'utf-8');
fs.writeFileSync(path.join(__dirname,'./localsrc.cache'),"",'utf-8');
let rimraf = require("rimraf");
rimraf('./cache',res=>{console.log(res)})
console.log("缓存清除成功")

0 comments on commit 5aac968

Please sign in to comment.