This repository has been archived by the owner on Jun 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Worked around microsoft/TypeScript#16577
- Loading branch information
1 parent
ecf7c23
commit 023cfb6
Showing
8 changed files
with
120 additions
and
7,024 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 |
---|---|---|
@@ -1 +1 @@ | ||
test/wasm/* linguist-vendored=true | ||
utils/* linguist-vendored=true |
Large diffs are not rendered by default.
Oops, something went wrong.
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
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,35 @@ | ||
"use strict"; | ||
|
||
const FileHound = require("filehound"); | ||
const fs = require("fs"); | ||
const path = require("path"); | ||
|
||
const files = FileHound.create() | ||
.paths(path.resolve(__dirname, "../lib/web/")) | ||
.discard("node_modules") | ||
.ext("js") | ||
.find(); | ||
|
||
console.log("Appending .js..."); | ||
files.then((filePaths) => { | ||
filePaths.forEach((filepath) => { | ||
fs.readFile(filepath, "utf8", (err, data) => { | ||
if (!data.match(/import .* from/g)) { | ||
return; | ||
} | ||
let newData = data.replace( | ||
/(import .* from\s+['"])(.*)(?=['"])/g, | ||
"$1$2.js" | ||
); | ||
if (err) throw err; | ||
|
||
console.log(`writing to ${filepath}`); | ||
fs.writeFile(filepath, newData, function (err) { | ||
if (err) { | ||
throw err; | ||
} | ||
console.log("complete"); | ||
}); | ||
}); | ||
}); | ||
}); |
Oops, something went wrong.