Closed nickyout closed 9 years ago
Excellent! Seems to still work. Thanks for contributing.
I noticed that despite my addition of pretty-data to package.json, it is still not being installed automatically. Apparently I had to run npm shrinkwrap
and commit the new npm-shrinkwrap.json. I also have some other minor things I just found. I'm making another pull request.
Hello. I like the functionality the json-schema-generator tool provides, but I've found its cli to be less intuitive than I am used to. I also tried to
npm install -g
it but it did not work. So I went and... changed a lot.npm install -g json-schema-generator
should work nowjson-schema-generator --help
pops up help with all command line optionscat input.json | json-schema-generator - > output.json
schemadir
ends with .json, it is assumed to be a destination file name now../test/cli-test.js
that test all i/o variations. Runnpm test ./test/cli-test.js
to see.require('json-schema-generator')
will now return only a function that accepts a js object and outputs a json schema js object. It can be browserified and it seems to work (tested in chrome). but I don't know if you care for such things.And I did not make handy separate commits of it, so you can't really select the parts you like easily. Sorry about that.
I hope you like the change and consider merging it back into your master and making a new npm release. Any remarks are welcome.