Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 27 days ago
JSON representation
Rollup plugin to automatically preserve shebangs in entry modules.
- Host: GitHub
- URL: https://github.com/developit/rollup-plugin-preserve-shebang
- Owner: developit
- Created: 2017-12-12T00:46:56.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-03-10T10:26:36.000Z (9 months ago)
- Last Synced: 2024-05-21T14:45:37.895Z (7 months ago)
- Topics: hashbang, nodejs, rollup, rollup-plugin, shebang
- Language: JavaScript
- Homepage: https://npm.im/rollup-plugin-preserve-shebang
- Size: 17.6 KB
- Stars: 49
- Watchers: 3
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome - preserve-shebang - Preserves leading shebang in a build entry. (Plugins / Output)
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