rollup-plugin-add-shebang
TypeScript icon, indicating that this package has built-in type declarations

0.3.1 • Public • Published

rollup-plugin-add-shebang

Rollup plugin that adds shebangs to output files

CircleCI

Installation

As usual, run npm install --save-dev rollup-plugin-add-shebang.

Usage

Inside your rollup.config.js to which files a shebang should be added:

// rollup.config.js
import shebang from 'rollup-plugin-add-shebang';
 
export default {
  ...
  plugins: [
    shebang({
      // A single or an array of filename patterns. Defaults to ['**/cli.js', '**/bin.js'].
      include: 'out/cli.js'
      // you could also 'exclude' here
      // or specify a special shebang (or a function returning one) using the 'shebang' option
    }),
  ],
  ...
};

Advantages over other shebang plugins

  • You don't have to add shebangs to your source files
  • It works when using code splitting

Package Sidebar

Install

npm i rollup-plugin-add-shebang

Weekly Downloads

1,302

Version

0.3.1

License

MIT

Unpacked Size

16 kB

Total Files

18

Last publish

Collaborators

  • lhechenberger