Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ls-age/rollup-plugin-add-shebang
Rollup plugin that adds shebangs to output files
https://github.com/ls-age/rollup-plugin-add-shebang
Last synced: 4 days ago
JSON representation
Rollup plugin that adds shebangs to output files
- Host: GitHub
- URL: https://github.com/ls-age/rollup-plugin-add-shebang
- Owner: ls-age
- Created: 2019-03-11T09:34:19.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2023-05-05T05:23:09.000Z (over 1 year ago)
- Last Synced: 2024-09-20T13:38:15.307Z (about 2 months ago)
- Language: TypeScript
- Size: 1.59 MB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# rollup-plugin-add-shebang
> Rollup plugin that adds shebangs to output files
[![CircleCI](https://circleci.com/gh/ls-age/rollup-plugin-add-shebang/tree/master.svg?style=svg)](https://circleci.com/gh/ls-age/rollup-plugin-add-shebang/tree/master)
## 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:
```javascript
// 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