https://github.com/goto-bus-stop/deps-transform
run browserify transforms on a module-deps stream
https://github.com/goto-bus-stop/deps-transform
Last synced: 3 months ago
JSON representation
run browserify transforms on a module-deps stream
- Host: GitHub
- URL: https://github.com/goto-bus-stop/deps-transform
- Owner: goto-bus-stop
- License: other
- Created: 2018-06-27T10:40:01.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2023-05-31T04:58:56.000Z (about 2 years ago)
- Last Synced: 2025-03-14T00:18:28.406Z (4 months ago)
- Language: JavaScript
- Size: 26.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# deps-transform
run browserify transforms on a module-deps stream
[![npm][npm-image]][npm-url]
[![travis][travis-image]][travis-url]
[![standard][standard-image]][standard-url][npm-image]: https://img.shields.io/npm/v/deps-transform.svg?style=flat-square
[npm-url]: https://www.npmjs.com/package/deps-transform
[travis-image]: https://img.shields.io/travis/com/goto-bus-stop/deps-transform.svg?style=flat-square
[travis-url]: https://travis-ci.com/goto-bus-stop/deps-transform
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square
[standard-url]: http://npm.im/standard## Install
```bash
npm install deps-transform
```## Usage
Use it to apply transforms after the 'deps' stage in the browserify pipeline:
```js
// minify JUST before packing
b.pipeline.get('pack').unshift(
transform('uglifyify'))
```You can use it to apply transforms on a preexisting bundle:
```bash
# extract modules from bundle.js,
# format them nicely using babel-preset-unminify,
# save in the out/ folder.
browser-unpack < bundle.js | \
deps-transform babelify --presets [ unminify ] | \
deps-write out
```Perhaps generate two bundles, one for modern browsers and one for old browsers:
```bash
browser-unpack < bundle.es6.js | \
deps-transform babelify --presets [ env ] | \
browser-pack > bundle.es5.js
```## License
[Apache-2.0](LICENSE.md)