module to manage a package.json for Simple Data Format packages
npm install datapackage-json -g
datapackage-json init
datapackage-json default
default
generates a default package.json from the prompt script without using a prompt (just gets default values)
init
asks the user for values and creates a package.json
from it
both arguments are optional. promptFile
must be a PromZard prompt script, dir
is the folder where the magic should happen, default is cwd
.
reads package.json
in pkg.dir
, calls cb
with (err, json)
prompts CLI user using promzard for package.json fields, and then writes the result out to package.json
if opts.defaults
is true it will bypass the promzard prompt and just write a default package.json
calls optional cb
with (err, data)
where data
the package object that was just written to the fs
generates a default package.json from the prompt script without using a prompt (just gets default values)
calls callback
with (err, defaults)
takes obj
and writes it as a nicely formatted JSON object to saveTarget
(default saveTarget
is just ./package.json
). calls optional cb
with (err)
BSD