-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from mohankumarelec/wsl-issues
Fixed WSL Issues
- Loading branch information
Showing
35 changed files
with
4,664 additions
and
837 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
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 |
---|---|---|
@@ -1,2 +1,9 @@ | ||
#!/bin/sh | ||
npx lint-staged | ||
|
||
if git diff --cached --name-only | grep -qE "^(package\.json|package-lock\.json)$"; then | ||
echo "Error: Changes to package.json or package-lock.json are not allowed." | ||
exit 1 | ||
fi | ||
|
||
echo "Completed Pre Commit Hooks ..." |
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 @@ | ||
import { Command, Option } from "commander"; | ||
import * as fs from "fs"; | ||
import * as path from "path"; | ||
import extensionConfig from "../webpack.config.mjs"; | ||
|
||
const targetMapping = { | ||
"win32-x64": "node-napi.win32-x64-msvc.node", | ||
"win32-arm64": "node-napi.win32-arm64-msvc.node", | ||
"linux-x64": "node-napi.linux-x64-gnu.node", | ||
"linux-arm64": "node-napi.linux-arm64-gnu.node", | ||
"linux-armhf": "node-napi.linux-arm-gnueabihf.node", | ||
"alpine-x64": "node-napi.linux-x64-musl.node", | ||
"darwin-x64": "node-napi.darwin-x64.node", | ||
"darwin-arm64": "node-napi.darwin-arm64.node", | ||
"alpine-arm64": "node-napi.linux-arm64-musl.node", | ||
}; | ||
|
||
const args = new Command() | ||
.addOption( | ||
new Option("--target [platform]", "Specify the target VS Code platform") | ||
.choices(Object.keys(targetMapping)) | ||
.makeOptionMandatory(), | ||
) | ||
.parse() | ||
.opts(); | ||
|
||
const outDir = extensionConfig[0].output.path; | ||
for (const file of fs.readdirSync(outDir)) { | ||
if (file === targetMapping[args.target]) { | ||
continue; | ||
} else if (file.startsWith("node-napi")) { | ||
console.log(`Deleting file: ${file}`); | ||
fs.unlinkSync(path.join(outDir, file)); | ||
} | ||
} |
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
Oops, something went wrong.