Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/developit/rollup-plugin-preserve-shebang

Rollup plugin to automatically preserve shebangs in entry modules.
https://github.com/developit/rollup-plugin-preserve-shebang

hashbang nodejs rollup rollup-plugin shebang

Last synced: 3 days ago
JSON representation

Rollup plugin to automatically preserve shebangs in entry modules.

Awesome Lists containing this project

README

        

# rollup-plugin-preserve-shebang

Automatically preserve a shebang in your entry file.

If you're building CLI's with Rollup, this will fix your npm `bin` being broken :)

## Installation

`npm i -D rollup-plugin-preserve-shebang`

## Usage

```js
import shebang from 'rollup-plugin-preserve-shebang';

export default {
plugins: [
shebang()
]
}
```

```js
shebang({
// Override the entry. By default, uses `input` from config:
entry: path.resolve(process.cwd(), 'src/foo.js'),

// You can also set it manually if you want, which will always prepend it:
shebang: '#!/usr/bin/env node'
})
```

## License

MIT