Detalhes do pacote

rollup-plugin-add-shebang

ls-age13.9kMIT0.3.1

Rollup plugin that adds shebangs to output files

rollup, plugin, add, shebang

readme (leia-me)

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

changelog (log de mudanças)

0.3.1 (2019-07-15)

Bug Fixes

  • Throw error with invalid shebang option (#80) (7ea57c4)

0.3.0 (2019-04-12)

Features

  • Allow shebang option to be a function (#14) (d699db8)

0.1.1 (2019-03-16)

Bug Fixes

  • Generate sourcemaps only if needed (#4) (5ca7303), closes #2

0.1.0 (2019-03-11)

Features