Commit 9ba5092
committed
fix: resolve compiled output from dist in bin and postinstall
Both resolve into lib/ relative to their own location, which stopped working
when the build moved output to dist/: lib/ now holds only TypeScript, so
running ./bin/tns or postinstall.js from a checkout fails with
MODULE_NOT_FOUND. The published package is unaffected, since dist/ is its
root and lib/ already sits next to bin/ there.
Both now prefer dist/lib when it exists and fall back otherwise, which covers
the checkout and the package without either needing to know which it is. The
other bin entries delegate to ./tns, so they are fixed with it.
npm install in a checkout runs postinstall and would hit the same failure -
masked only because npm run setup passes --ignore-scripts.1 parent cb3fb8d commit 9ba5092
2 files changed
Lines changed: 15 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
6 | 13 | | |
7 | 14 | | |
8 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
6 | 11 | | |
7 | | - | |
| 12 | + | |
8 | 13 | | |
9 | 14 | | |
10 | 15 | | |
0 commit comments