Added different statuscodes & dev server
This commit is contained in:
parent
03ccb2f154
commit
b1df716e69
|
@ -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
|
||||
```
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -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",
|
||||
|
|
4005
public/js/ttl.js
4005
public/js/ttl.js
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue