@robmarr/rollup-plugin-shebang

v1.0.1
Rollup plugin to preserve or append a shebang on an output
rollup rollup-plugin shebang cli

rollup-plugin-shebang

XO code style Coverage Status

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.

npm i @robmarr/rollup-plugin-shebang

Metadata

  • ISC
  • Whatever
  • Robin Marr
  • released 2/26/2019

Downloads

Maintainers