Added support for global installation

This commit is contained in:
Pieter Colpaert 2014-04-28 11:51:16 +02:00
parent af9abe3f2d
commit 3740a5e0ca
3 changed files with 6 additions and 3 deletions

View File

@ -5,5 +5,5 @@ Command line tool for validating Turtle and Ntriples documents on syntax and XSD
Usage: Usage:
npm install turtle-validator npm install turtle-validator -g
node TurtleValidator.js <path-to-file> ttl <path-to-file>

View File

@ -1,8 +1,10 @@
#!/usr/bin/env node
var N3 = require('n3'), fs = require('fs'), N3Util = N3.Util; var N3 = require('n3'), fs = require('fs'), N3Util = N3.Util;
if (!process.argv[2]) { if (!process.argv[2]) {
console.log('RDF N3/NTriples/Turtle file validator'); console.log('RDF N3/NTriples/Turtle file validator');
console.log('Usage: $ node N3Validator.js <path-to-file>'); console.log('Usage: $ ttl <path-to-file>');
process.exit(1); process.exit(1);
} }

View File

@ -3,6 +3,7 @@
"version": "0.1.0", "version": "0.1.0",
"description": "This command line tool validates Turtle documents and does XSD datatype checks", "description": "This command line tool validates Turtle documents and does XSD datatype checks",
"main": "TurtleValidator.js", "main": "TurtleValidator.js",
"bin" : { "ttl" : "./TurtleValidator.js" },
"dependencies": { "dependencies": {
"n3": "~0.2.6" "n3": "~0.2.6"
}, },