Skip to content

Commit

Permalink
Deprecate ts-script in favor of ts-node-script (#948)
Browse files Browse the repository at this point in the history
* Create `ts-transpile` bin script

* Rename `transpile` to `ts-node-transpile-only`

* Deprecate `ts-script` in favor of `ts-node-script`

* Rename script.ts and transpile.ts to bin-* to clarify intent

* Rename script-deprecated to bin-script-deprecated

* fix linter failures

* fix tests

Co-authored-by: Andrew Bradley <cspotcode@gmail.com>
  • Loading branch information
G-Rath and cspotcode committed Feb 15, 2020
1 parent f3f61e2 commit 4d3305f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -6,7 +6,8 @@
"types": "dist/index.d.ts",
"bin": {
"ts-node": "dist/bin.js",
"ts-script": "dist/bin-script.js",
"ts-script": "dist/bin-script-deprecated.js",
"ts-node-script": "dist/bin-script.js",
"ts-node-transpile-only": "dist/bin-transpile.js"
},
"files": [
Expand Down
10 changes: 10 additions & 0 deletions src/bin-script-deprecated.ts
@@ -0,0 +1,10 @@
#!/usr/bin/env node

import { main } from './bin'

console.warn(
'ts-script has been deprecated and will be removed in the next major release.',
'Please use ts-node-script instead'
)

main(['--script-mode', ...process.argv.slice(2)])

0 comments on commit 4d3305f

Please sign in to comment.