rollup-plugin-hashbang
Preserve hashbang and make output file executable.
Last updated 5 years ago by egoist .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install rollup-plugin-hashbang 
SYNC missed versions from official npm registry.

rollup-plugin-hashbang

NPM version NPM downloads

Install

npm i rollup-plugin-hashbang -D

Usage

With rollup.config.js:

import hashbang from "rollup-plugin-hashbang";

export default {
  plugins: [hashbang()],
};

In:

#!/usr/bin/env node

console.log("hi");

Output:

#!/usr/bin/env node
"use strict";

console.log("hi");

Hashbang is preserved and the output file will be executable you don't need to chmod +x FILE to run it.

Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

Author

rollup-plugin-hashbang © EGOIST, Released under the MIT License.
Authored and maintained by EGOIST with help from contributors (list).

egoist.moe · GitHub @EGOIST · Twitter @_egoistlily

Current Tags

  • 3.0.0                                ...           latest (5 years ago)

7 Versions

  • 3.0.0                                ...           5 years ago
  • 2.2.2                                ...           8 years ago
  • 2.2.1                                ...           8 years ago
  • 2.2.0                                ...           8 years ago
  • 2.0.0                                ...           8 years ago
  • 1.0.1                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
Maintainers (2)
Downloads
Total 25
Today 0
This Week 0
This Month 7
Last Day 0
Last Week 1
Last Month 7
Dependencies (1)
Dev Dependencies (8)
Dependents (1)

© 2010 - cnpmjs.org x YWFE | Home | YWFE