Skip to content

Commit

Permalink
cross-env shebangs
Browse files Browse the repository at this point in the history
  • Loading branch information
mfornos committed Jul 3, 2023
1 parent c3e1047 commit 126aafb
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
},
"scripts": {
"build": "tsup **/main.ts --clean --minify && yarn sed:shebang",
"sed:shebang": "shx sed -i \"s/ts-node-esm/node/g\" dist/**/*.cjs > /dev/null"
"sed:shebang": "shx sed -i \"s/\\/env ts-node-esm/\\/env node/g\" dist/**/*.cjs > /dev/null"
},
"stableVersion": "1.0.0"
}
8 changes: 6 additions & 2 deletions tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,11 @@
"shims": true
},
"scripts": {
"build": "tsup src/main.ts --clean --minify"
"build": "tsup src/main.ts --clean --minify && yarn sed:shebang",
"sed:shebang": "shx sed -i \"s/\\/env ts-node-esm/\\/env node/g\" dist/**/*.cjs > /dev/null"
},
"stableVersion": "1.0.0"
"stableVersion": "1.0.0",
"devDependencies": {
"shx": "^0.3.4"
}
}
2 changes: 1 addition & 1 deletion tools/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env node
#!/usr/bin/env ts-node-esm

import { defineCommand, runMain } from 'citty';
import capture from './commands/capture.js';
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1557,6 +1557,7 @@ __metadata:
"@sodazone/ocelloids-test": 1.0.0-dev.0
cbor-x: ^1.5.3
citty: ^0.1.1
shx: ^0.3.4
bin:
octools: dist/main.cjs
languageName: unknown
Expand Down

0 comments on commit 126aafb

Please sign in to comment.