whyrusleeping / gx

A package management tool
MIT License
1.88k stars 110 forks source link

Non-destructive init #119

Open ghost opened 8 years ago

ghost commented 8 years ago

It would be useful to have a non-destructive init command, which takes an existing package.json, and fills in certain defaults if they're not set.

This is especially useful for fixing up packages that were put together hastily, or when the respective attributes didn't exist yet.

> jq .gx.dvcsimport package.json
null
> jq .releaseCmd package.json
null

> gx init

> jq .gx.dvcsimport package.json
"github.com/foo/bar"
> jq .releaseCmd package.json
"git commit -a -m \"gx publish $VERSION\""