-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add type checking script and build step from clients
- Loading branch information
1 parent
9965c2d
commit 9f8be98
Showing
3 changed files
with
37 additions
and
1 deletion.
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
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
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,29 @@ | ||
const concurrently = require("concurrently"); | ||
const path = require("path"); | ||
const fs = require("fs"); | ||
|
||
function getFiles(dir) { | ||
results = []; | ||
fs.readdirSync(dir).forEach((file) => { | ||
file = path.join(dir, file); | ||
const stat = fs.statSync(file); | ||
if (stat && stat.isDirectory()) { | ||
results = results.concat(getFiles(file)); | ||
} else { | ||
results.push(file); | ||
} | ||
}); | ||
return results; | ||
} | ||
|
||
const files = getFiles(path.join(__dirname, "../src", "../jslib")).filter((file) => { | ||
const name = path.basename(file); | ||
return name === "tsconfig.json"; | ||
}); | ||
|
||
concurrently( | ||
files.map((file) => ({ | ||
name: path.basename(path.dirname(file)), | ||
command: `npx tsc --noEmit --project ${file}`, | ||
})) | ||
); |