# browserify-express

> browserify v2 middleware for express

Latest version **0.1.4** (published 2013-12-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install browserify-express
pnpm add browserify-express
yarn add browserify-express
bun add browserify-express
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.4 |
| Published | 2013-12-11 |
| First published | 2013-03-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 6 |
| Known vulnerabilities | 0 (+2 in 1 direct dependencies) |
| Install scripts | no |
| Author | Nathan Miller |
| Maintainers | dstrek |
| Keywords | browserify, express, middleware, watcher |

## Links

- npm: https://www.npmjs.com/package/browserify-express
- Repository: http://github.com/dstrek/node-browserify-express
- Issues: https://github.com/dstrek/node-browserify-express/issues
- npm.io page: https://npm.io/package/browserify-express

## Dependencies (6)

- [watchr](https://npm.io/package/watchr.md) ~2.4.3
- [through](https://npm.io/package/through.md) ~2.3.4
- [uglify-js](https://npm.io/package/uglify-js.md) ~2.3.6
- [browserify](https://npm.io/package/browserify.md) ~2.22.0
- [coffee-script](https://npm.io/package/coffee-script.md) ~1.6.2
- [convert-source-map](https://npm.io/package/convert-source-map.md) ~0.2.5

## Alternatives

- [@opentelemetry/exporter-zipkin](https://npm.io/package/@opentelemetry/exporter-zipkin.md) — 14.8M weekly downloads
- [pusher-js](https://npm.io/package/pusher-js.md) — 2.0M weekly downloads
- [browserify](https://npm.io/package/browserify.md) — 1.7M weekly downloads
- [sqs-consumer](https://npm.io/package/sqs-consumer.md) — 1.7M weekly downloads
- [@sanity/eventsource](https://npm.io/package/@sanity/eventsource.md) — 930.8K weekly downloads

## Recent versions

- 0.1.4 (latest) — 2013-12-11
- 0.1.3 — 2013-12-10
- 0.1.2 — 2013-11-18
- 0.1.1 — 2013-06-30
- 0.1.0 — 2013-06-30
- 0.0.8 — 2013-05-06
- 0.0.7 — 2013-05-01
- 0.0.6 — 2013-03-18
- 0.0.5 — 2013-03-16
- 0.0.4 — 2013-03-12
- 0.0.3 — 2013-03-05
- 0.0.2 — 2013-03-04
- 0.0.1 — 2013-03-04

## README

## browserify v2 middleware for express 

Basically just brings back the features that were originally in browserify v1

This is how you use it in an Express project.

```javascript
var browserify_express = require('browserify-express');
var bundle = browserify_express({
	entry: __dirname + '/app/js/entry.js',
	watch: __dirname + '/app/js/',
	mount: '/js/myapp.js',
	verbose: true,
	minify: true,
	bundle_opts: { debug: true } // enable inline sourcemap on js files 
	write_file: __dirname + '/public/js/myapp.js',
	ignore: ['optional.js'] // optional array of files to ignore
});

app.use(bundle);
```

In this example: 

* watch for changes to files in the directory defined in `watch`, this can also just watch a single file. 
* make the bundle accessible at '/js/myapp.js'
* minify the bundle using uglify-js2
* print messages to the console to show re-bundling and times
* pass opts.debug to browserify.bundle
* pass recursive:false to node-watch (see all options for [node-watch](https://npmjs.org/package/node-watch))
* write the file to disk at the specified path

### using coffee-script

This is supported by default however all your require()'s must include the .coffee extensions, it will not pick it up by default.


e.g. require('../views/pop.coffee')

---
_Source: https://npm.io/package/browserify-express · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
