hughsk / envify

:wrench: Selectively replace Node-style environment variables with plain strings.
902 stars 57 forks source link

Error in code example #3

Closed minicuper closed 10 years ago

minicuper commented 10 years ago

There is an error in the last code example:

var browserify = require('browserify')
  , envify = require('envify/custom')
  , fs = require('fs')

var bundle = browserify('main.js')
  , output = fs.createWriteStream('bundle.js')

b.transform(envify({
  NODE_ENV: 'development'
}))
b.bundle().pipe(output)

You should use b insead of bundle variable.

hughsk commented 10 years ago

Thanks!