Added different statuscodes & dev server

This commit is contained in:
Miel Vander Sande 2019-01-10 12:43:45 +01:00
parent 03ccb2f154
commit b1df716e69
5 changed files with 5589 additions and 1621 deletions

View File

@ -18,8 +18,17 @@ Examples:
## Or install the browser client
```bash
# Equivalent to: npm build
npm install
browserify lib/validator.js -o public/js/ttl.js
```
Then use it in your browser using the index.html in the public folder.
You can run this locally as follows.
```bash
# Equivalent to: npm start
npm install
browserify lib/validator.js -o public/js/ttl.js
ws
```

View File

@ -45,6 +45,7 @@ function validateArgument(arg) {
validate(res, showValidation);
}).on('error', function (e) {
console.log("Got error: " + e.message);
process.exit(1);
});
break;
case null:
@ -52,6 +53,7 @@ function validateArgument(arg) {
break;
default:
console.log('Cannot access %s: "%s" not supported', parsedUrl.href, parsedUrl.protocol)
process.exit(1);
}
}
@ -64,4 +66,5 @@ function showValidation(feedback) {
console.log('WARNING: ' + warning);
});
console.log("Validator finished with " + feedback.warnings.length + " warnings and " + feedback.errors.length + " errors.");
process.exit(feedback.errors.length > 0 ? 2 : 0);
}

2871
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,13 +9,17 @@
"dependencies": {
"n3": "1.0.0-beta.1"
},
"devDependencies": {},
"devDependencies": {
"browserify": "^16.2.3",
"local-web-server": "^2.6.1"
},
"engines": {
"node": ">=4.0"
},
"scripts": {
"build": "browserify lib/validator.js -o public/js/ttl.js",
"test": "echo \"Error: no test specified\" && exit 1"
"test": "echo \"Error: no test specified\" && exit 1",
"start": "npm install && npm build && ws"
},
"repository": {
"type": "git",

File diff suppressed because it is too large Load Diff