2014-07-14 03:23:52 +00:00
|
|
|
---
|
|
|
|
title: Browserify
|
2015-11-24 05:02:17 +00:00
|
|
|
category: JavaScript libraries
|
2023-03-14 01:52:21 +00:00
|
|
|
tags: [Archived]
|
|
|
|
archived: Browserify has not been in active development.
|
2014-07-14 03:23:52 +00:00
|
|
|
---
|
|
|
|
|
2023-03-14 01:52:21 +00:00
|
|
|
### About
|
|
|
|
{: .-intro}
|
|
|
|
|
|
|
|
Browserify is a bundler for JavaScript.
|
|
|
|
|
|
|
|
- <https://browserify.org/>
|
|
|
|
|
|
|
|
### Usage
|
|
|
|
|
2014-07-14 03:23:52 +00:00
|
|
|
browserify input.js
|
|
|
|
-o output.js
|
|
|
|
-t coffeeify
|
|
|
|
-t [ coffeeify --extension coffee ]
|
2015-08-04 02:41:26 +00:00
|
|
|
|
|
|
|
-u react (--exclude: omit a file)
|
|
|
|
-x react (--external: reference in another bundle)
|
|
|
|
-i react (--ignore: stub a file)
|
|
|
|
-s Myapp (--standalone: generate a UMD bundle)
|
2014-07-14 03:23:52 +00:00
|
|
|
--debug
|
|
|
|
|
|
|
|
### Programmatic usage
|
|
|
|
|
|
|
|
browserify = require('browserify')
|
|
|
|
browserify()
|
|
|
|
.add('main.js')
|
|
|
|
.bundle()
|
|
|
|
.transform(coffeeify)
|
|
|
|
.transform({extensions: '.coffee'}, coffeeify)
|
|
|
|
.pipe(process.stdout)
|
|
|
|
|
|
|
|
browserify({})
|
|
|
|
|
|
|
|
### Tools
|
|
|
|
|
|
|
|
* watchify (recompiles on demand)
|
|
|
|
* beefy (http server)
|
|
|
|
* debowerify
|
|
|
|
* es6ify (es6 to es5)
|
|
|
|
|
|
|
|
Transforms
|
|
|
|
|
|
|
|
* coffeeify
|
|
|
|
* ractify
|
|
|
|
* reactify
|
|
|
|
* brfs
|
|
|
|
* cssify
|
|
|
|
* https://github.com/substack/node-browserify/wiki/list-of-transforms
|
|
|
|
|