spmrc

spmrc

spmrc

The rc manager for spm.


Now we use ~/.spm/spmrc-3x as default rc file for spm@3.x;

var spmrc = require('spmrc');

spmrc is located at ~/.spm/spmrc-3x in ini format. An example:

[user]
username = spm
 
[template:arale]
url = http://aralejs.org/hello

Get information in spmrc:

spmrc.get('user')
// {username: 'spm'} 
 
spmrc.get('user.username')
// spm 

Set value in a section:

spmrc.set('user.username', 'spmjs')

A mix of get and set:

spmrc.config('user.username')  // equal spmrc.get 
spmrc.config('user.username', 'spm')  // equal spmrc.set 

Parse an ini file to object. Default file is ~/.spm/spmrc.

spmrc.parse(file)
// an object 

Write object to ~/.spm/spmrc.

spmrc.write(obj)

2013-03-26 1.0.0

spmrc -> spmrc-3x.

2013-03-26 0.1.3

bugfix for windows. windows use process.env.HOMEPATH.

2013-03-17 0.1.2

spmrc has user.temp default value.

2013-03-17 0.1.1

spmrc has default values.

2013-03-14 0.1.0

First version.