browserify-express
browserify v2 middleware for express
Last updated 6 years ago by dstrek .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install browserify-express 
SYNC missed versions from official npm registry.

browserify 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.

var browserify = require('browserify');
var browser_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
});

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

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')

Current Tags

  • 0.1.4                                ...           latest (6 years ago)

13 Versions

  • 0.1.4                                ...           6 years ago
  • 0.1.3                                ...           6 years ago
  • 0.1.2                                ...           7 years ago
  • 0.1.1                                ...           7 years ago
  • 0.1.0                                ...           7 years ago
  • 0.0.8                                ...           7 years ago
  • 0.0.7                                ...           7 years ago
  • 0.0.6                                ...           7 years ago
  • 0.0.5                                ...           7 years ago
  • 0.0.4                                ...           7 years ago
  • 0.0.3                                ...           7 years ago
  • 0.0.2                                ...           7 years ago
  • 0.0.1                                ...           7 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (6)
Dev Dependencies (0)
None
Dependents (1)

Copyright 2014 - 2016 © taobao.org |