Skip to content

Commit

Permalink
cross-platform clean, and fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
elliottzheng committed Mar 15, 2019
2 parents d8de9a6 + a75423d commit b067f89
Show file tree
Hide file tree
Showing 9 changed files with 43 additions and 14,298 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -30,3 +30,4 @@ src/*/*.js
src/*.js
dist
/package-lock.json
/yarn.lock
21 changes: 21 additions & 0 deletions clean.js
@@ -0,0 +1,21 @@
const path = require("path");
const fs = require("fs");
function walk(dir) {
var results = [];
var list = fs.readdirSync(dir);
list.forEach(function(file) {
file = path.join(dir, file);
var stat = fs.statSync(file);
if (stat && stat.isDirectory()) {
results = results.concat(walk(file));
} else {
// 过滤后缀名(可按你需求进行新增)
if (path.extname(file) === ".js") {
results.push(path.resolve(__dirname, file));
}
}
});
return results;
}

walk(path.join(__dirname, "src")).forEach(file => fs.unlinkSync(file));
Binary file modified icon.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b067f89

Please sign in to comment.