Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cross-platform clean, and fix windows build
- Loading branch information
Showing
9 changed files
with
43 additions
and
14,298 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -30,3 +30,4 @@ src/*/*.js | |
src/*.js | ||
dist | ||
/package-lock.json | ||
/yarn.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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)); |
Oops, something went wrong.