extend-file v0.1.2
extend-file 
Extend a JSON file with additional properties, API and CLI.
(Table of contents generated by verb)
Usage
API
Install
Install with npm
$ npm i extend-file --savevar extendFile = require('extend-file');
extendFile('package.json', {foo: 'bar'});
// adds `{foo: "bar"} to package.jsonCLI
Install
Install globally with npm
$ npm i -g extend-filePass the file to extend as the first argument.
$ expand-file package.json [data]
^data
Specify the data to use for extending the file.
$ expand-file package.json [data]
^Data may be specified using one of the following flags:
-dor--data: specify a string to expand with expand-object-for--file: specify a JSON or YAML file to use for data
Pass an object
Use the object expansion syntax supported by expand-object:
$ expand-file package.json -d "a.b.c:foo,bar,baz"
#=> "a":{"b":{"c":["foo","bar","baz"]}}}Any issues related to --data expansion should be created on the expand-objectrepo.
Specify a JSON or YAML file
Use the contents of another file to extend the first file.
$ expand-file package.json -f foo.ymlJSON and YAML are supported.
Related projects
expand-object: Expand a string into a JavaScript object using a simple notation. Use the CLI or… more
Running tests
Install dev dependencies:
$ npm i -d && npm testContributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue
Author
Jon Schlinkert
License
Copyright © 2015 Jon Schlinkert Released under the MIT license.
This file was generated by verb-cli on August 01, 2015.