Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brechtcs/webrunify
Bundle a CommonJS module and its dependencies into a single ES module
https://github.com/brechtcs/webrunify
Last synced: 3 months ago
JSON representation
Bundle a CommonJS module and its dependencies into a single ES module
- Host: GitHub
- URL: https://github.com/brechtcs/webrunify
- Owner: brechtcs
- License: apache-2.0
- Created: 2018-11-30T21:55:44.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-26T13:44:39.000Z (about 6 years ago)
- Last Synced: 2024-10-28T13:11:26.873Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 12
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# webrunify
Bundle a CommonJS module and its dependencies into a single standard ECMAScript module.
## Usage
The simplest way to use `webrunify` is through the command line. To bundle `index.js` and all its dependencies into an ECMAScript module, simply use these commands:
```sh
npm install -g webrunify
webrunify index.js > bundle.js
```This example does the same thing using the JavaScript API:
```js
var bs = require('browserify')
var fs = require('fs')
var wr = require('webrunify')var out = fs.createWriteStream('./bundle.js')
var b = bs('./index.js')
b.plugin(wr)
b.bundle().pipe(out)```
## License
Apache-2.0