Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate ts node script #948

Merged
merged 11 commits into from Feb 15, 2020
4 changes: 3 additions & 1 deletion package.json
Expand Up @@ -6,7 +6,9 @@
"types": "dist/index.d.ts",
"bin": {
"ts-node": "dist/bin.js",
"ts-script": "dist/script.js"
"ts-script": "dist/script-deprecated.js",
"ts-node-script": "dist/script.js",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Let's move to bin-*.js to clarify intent, but LGTM.

"ts-node-transpile-only": "dist/transpile.js"
},
"files": [
"dist/",
Expand Down
10 changes: 10 additions & 0 deletions src/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)]);
5 changes: 5 additions & 0 deletions src/transpile.ts
@@ -0,0 +1,5 @@
#!/usr/bin/env node

import { main } from './bin'

main(['--transpile-only', ...process.argv.slice(2)])