rollup-plugin-preserve-shebang

Automatically preserve a shebang in your entry file.

MIT 8 个版本
安装
npm install rollup-plugin-preserve-shebang
yarn add rollup-plugin-preserve-shebang
pnpm add rollup-plugin-preserve-shebang
bun add rollup-plugin-preserve-shebang
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

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

export default {
    plugins: [
        shebang()
    ]
}
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

版本列表
1.0.1 2020-06-13
1.0.0 2020-05-22
0.1.6 2018-01-24
0.1.5 2018-01-22
0.1.4 2017-12-12
0.1.3 2017-12-12
0.1.2 2017-12-12
0.1.1 2017-12-12