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

rollup-plugin-hashbang

NPM version NPM downloads CircleCI donate chat

Install

yarn add rollup-plugin-hashbang --dev

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.

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

  • 2.2.2                                ...           latest (2 years ago)

6 Versions

  • 2.2.2                                ...           2 years ago
  • 2.2.1                                ...           2 years ago
  • 2.2.0                                ...           2 years ago
  • 2.0.0                                ...           2 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago

Copyright 2014 - 2016 © taobao.org |