babel-plugin-shebang
Replace or prepend shebang.
Useful to write #!/usr/bin/env ./node_modules/.bin/babel-node
modules in development env, and compile to #!/usr/bin/env node
in production env.
Installation
$ npm install babel-plugin-shebang
Example
.babelrc
input
#!/usr/bin/env ./node_modules/.bin/babel-nodeconsole;
output
#!/usr/bin/env nodeconsole;
Usage
.babelrc
(Recommended)
Via .babelrc
Options
replacement
(String): Defaults to#!/usr/bin/env node
force
(Boolean): Force prepend shebang. Defaults tofalse
Via CLI
$ babel --plugins shebang script.js
Via Node API
;
License
MIT