Skip to content
This repository was archived by the owner on Sep 17, 2023. It is now read-only.

Commit cca8ab0

Browse files
committed
fix(npm): download the monorepo into the typescript-tools project dir
Instead of downloading the monorepo binary into the node_modules/.bin directory directly, provide a dummy script that `npm install` symlinks into that directly, and download the monorepo binary into the node_modules/@typescript-tools/rust-implementation/.bin directory, at the source of the symlink. Closes #115
1 parent 439c09b commit cca8ab0

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

bin/monorepo

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# This is a dummy binary that is the subject of the `npm install` workflow --
2+
# it gets linked into node_modules/.bin and marked as executable before the
3+
# npm postInstall hook executes

npm/binary-install.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Binary {
4242
}
4343
this.url = url;
4444
this.name = name;
45-
this.installDirectory = join(__dirname, "../bin");
45+
this.installDirectory = join(__dirname, "../@typescript-tools/rust-implementation/bin");
4646

4747
if (!existsSync(this.installDirectory)) {
4848
mkdirSync(this.installDirectory, { recursive: true });

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
"standard-version": "9.3.2"
3535
},
3636
"files": [
37+
"bin/",
3738
"npm/"
3839
]
3940
}

0 commit comments

Comments
 (0)