rollup-plugin-shebang
A Rollup plugin to add a shebang to the top of a bundle.
Usage
Install the plugin with NPM:
npm i -D @robmarr/rollup-plugin-shebang
Add it to your rollup configuration:
import shebang from '@robmarr/rollup-plugin-shebang'
export default {
plugins: [
shebang()
]
}
by default #!/usr/bin/env node
is added but an alternative shebang can be used by passing it as an argument.
import shebang from '@robmarr/rollup-plugin-shebang'
export default {
plugins: [
shebang('#!/usr/local/bin/node')
]
}
Thanks
yingye for rollup-plugin-banner, it was the template for this plugin.