lego-modify
modify file content with lego init.
Last updated 5 years ago by herbertliu .
ISC · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install lego-modify 
SYNC missed versions from official npm registry.

legorc Build Status

The rc manager for lego.


Upgrade info for 1.x.x

Now we use ~/.lego/legorc as default rc file for lego@3.x;

Usage

var legorc = require('legorc');

legorc is located at ~/.lego/legorc in ini format. An example:

[user]
username = lego

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

legorc.get

Get information in legorc:

legorc.get('user')
// {username: 'lego'}

legorc.get('user.username')
// lego

legorc.set

Set value in a section:

legorc.set('user.username', 'legojs')

legorc.config

A mix of get and set:

legorc.config('user.username')  // equal legorc.get
legorc.config('user.username', 'lego')  // equal legorc.set

legorc.parse

Parse an ini file to object. Default file is ~/.lego/legorc.

legorc.parse(file)
// an object

legorc.write

Write object to ~/.lego/legorc.

legorc.write(obj)

Changelog

2013-03-26 1.0.0

legorc -> legorc.

2013-03-26 0.1.3

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

2013-03-17 0.1.2

legorc has user.temp default value.

2013-03-17 0.1.1

legorc has default values.

2013-03-14 0.1.0

First version.

Current Tags

  • 0.0.3                                ...           latest (5 years ago)

2 Versions

  • 0.0.3                                ...           5 years ago
  • 0.0.2                                ...           5 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 15
Last Day 0
Last Week 0
Last Month 30
Dependencies (2)
Dev Dependencies (2)
Dependents (3)

Copyright 2014 - 2016 © taobao.org |