browserify-dev-middleware

Middleware to compile browserify files on request for development purpose.

npm install browserify-dev-middleware
14 downloads in the last week
42 downloads in the last month

browserify-dev-middleware

Middleware to compile browserify files on request for development purpose.

Example

Say you have a folder /assets that holds your browserify files.

app.use(require('browserify-dev-middleware')({
  src: __dirname + '/assets'
}));

In your view (using jade)

html
  head
  body
    script( src='/commits.js' )

Browserify Dev Middleware will compile /assets/commits.js and serve it on request.

Adding transforms

Add transforms by passing it as an option.

````javascript app.use(require('browserify-dev-middleware')({ src: '...' transforms: [require('jadeify')] }));

Contributing

Please fork the project and submit a pull request with tests. Install node modules npm install and run tests with npm test.

License

MIT

npm loves you