0.1.0 • Published 10 years ago
subconfig v0.1.0
subconfig
Browserify transform to substitute config variables using underscore templates.
Installation
$ npm install subconfigNote that you must also install config package:
$ npm install config
$ mkdir config
$ $EDITOR config/default.jsUsage
To be able to write in your client-side code, say, var socket = Primus('<%= ServerAddress %>'), do
$ browserify -t subconfig app.js > bundle.jsTo use custom prefix (<%= conf.ServerAddress %>):
$ browserify -t [ subconfig -p conf ] app.js > bundle.jsor
$ browserify -t [ subconfig --prefix conf ] app.js > bundle.jsExport NODE_ENV=production environment variable to switch to production config.
License
MIT
0.1.0
10 years ago