json-schema icon indicating copy to clipboard operation
json-schema copied to clipboard

publish to npm

Open tmpvar opened this issue 14 years ago • 3 comments

json-schema appears to be a valid node.js module.

tmpmac:lib tmpvar$ pwd
/Users/tmpvar/work/javascript/json-schema/lib
tmpmac:lib tmpvar$ node
> require('./validate');
{ [Function: validate]
  Integer: { type: 'integer' },
  validate: [Circular],
  checkPropertyChange: [Function],
  _validate: [Function],
  mustBeValid: [Function] }
> 

It would be great if I could just npm install json-schema

tmpvar avatar May 11 '11 19:05 tmpvar

looks like there is an issue installing; I've created an issue on npm: https://github.com/isaacs/npm/issues/901

tmpvar avatar May 11 '11 20:05 tmpvar

FWIW you can also install directly from the tarball for now:

 npm install https://github.com/kriszyp/json-schema/tarball/master
 node -e 'require("json-schema/lib/validate")'

smith avatar May 11 '11 20:05 smith

dang, very nice. Apparently this also works!

tmpmac:test tmpvar$ cat package.json
{
  "author": "",
  "name": "test",
  "version": "0.0.0",
  "repository": {
    "url": ""
  },
  "engines": {
    "node": "~v0.4.8-pre"
  },
  "dependencies": {
    "json-schema" : "https://github.com/kriszyp/json-schema/tarball/master"
  },
  "devDependencies": {}
}

tmpvar avatar May 11 '11 20:05 tmpvar