Skip to content

Commit

Permalink
增加清除缓存
Browse files Browse the repository at this point in the history
  • Loading branch information
lilinsen committed Mar 18, 2019
1 parent a38f5c8 commit 9c81359
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +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 webpack-dev-server -d --open -w --progress --config build/webpack.doc.dev.conf.js",
"dev: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 webpack --hide-modules --progress --config build/webpack.doc.build.conf.js",
Expand Down
5 changes: 5 additions & 0 deletions scripts/clearcache.js
Original file line number Diff line number Diff line change
@@ -0,0 +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');
console.log("缓存清除成功")

0 comments on commit 9c81359

Please sign in to comment.