Skip to content

Latest commit

 

History

History
91 lines (56 loc) · 1.5 KB

.verb.md

File metadata and controls

91 lines (56 loc) · 1.5 KB

{%= name %} {%= badge("fury") %}

{%= description %}

Usage

API

Install

{%= include("install-npm", {save: true}) %}

var file = require('{%= name %}');

file('package.json', {foo: 'bar'});
// adds `{foo: "bar"} to package.json

CLI

Install

{%= include("install-global") %}

Pass 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:

  • -d or --data: specify a string to expand with [expand-object]
  • -f or --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-object] repo.

Specify a JSON or YAML file

Use the contents of another file to extend the first file.

$ expand-file package.json -f foo.yml

JSON and YAML are supported.

Related projects

{%= related(verb.related.list, {remove: name}) %}

Running tests

{%= include("tests") %}

Contributing

{%= include("contributing") %}

Author

{%= include("author") %}

License

{%= copyright() %} {%= license() %}


{%= include("footer") %}

{%= reflinks(["verb", "expand-object"]) %}