https://github.com/seebigs/bundl-write
https://github.com/seebigs/bundl-write
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/seebigs/bundl-write
- Owner: seebigs
- Created: 2016-08-05T14:23:23.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2018-05-17T19:49:13.000Z (about 8 years ago)
- Last Synced: 2025-06-14T12:48:29.376Z (12 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bundl-write
*Write bundles to disk*
*Runs with the amazing [Bundl](https://github.com/seebigs/bundl) build tool*
## Install
```
$ npm install --save-dev bundl-write
```
## Use
```js
var Bundl = require('bundl');
var minify = require('bundl-minify');
var rename = require('bundl-rename');
var write = require('bundl-write');
new Bundl(targets)
.then(write())
.then(minify())
.then(rename('.min.js'))
.then(write())
.go();
```
## Options
### Defaults to the `outputDir` of each added bundle
```js
new Bundl()
.add(targets, { outputDir: '../one' })
.add(targets, { outputDir: '../two' })
.then(write())
.go();
```
### Override outputDir with a String
```js
new Bundl(targets)
.then(write('../dist'))
.go();
```
### Override with an options Object
```js
var options = {
outputDir: '../dist'
};
new Bundl(targets)
.then(write(options))
.go();
```