Skip to content

Add ability to --transpile-only from a shebang #703

Description

@cspotcode

Linux doesn't support passing args to a binary via shebang; only Mac as far as I know. Linux treats everything following the binary as a single arg. So, for example, this will not work:

#!/usr/bin/env ts-node --transpile-only
# No such binary named "ts-node --transpile-only"

On my project, we want to write shell scripts in .ts but run them with --transpile-only. The only way I can think to do this is creating a new binary, for example ts-node-transpile-only, that behaves exactly like ts-node but with --transpile-only enabled by default.

Then we can do the following:

#!/usr/bin/env ts-node-transpile-only

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions