tweak
v1.1.0
Published
JSON configuration files for node, simplified to one function
Downloads
14
Maintainers
Readme
tweak
JSON configuration files for node, simplified to one function.
Usage
It is very simple to integrate configuration files with tweak.
var tweak = require('tweak')
var myConfig = tweak('my-config.json')Tweak will automatically load the file with require (so CoffeeScript files etc are also allowed for) if it exists, else will attempt to load a file named the same but with the pre-extension 'default' and will create a file of the name for editing. (e.g. if 'my-config.json' was not found, then it will attempt to load 'my-config.default.json' then create the file 'my-config.json' with the same content).
If an extension is not specified then tweak will add .json onto the end.
Installation
npm install tweak