add a command for static syntax check with babel.js

1.1.101
francesco 3 years ago
parent f54063fda1
commit 4874abf097

@ -7,4 +7,11 @@ Using docker
Using bash
```zip -r build/p4t.xpi chrome```
```zip -r build/p4t.xpi chrome```
## Check syntax statically
You can parse the code with [Babel](https://babeljs.io/) in order to
catch syntax errors. After installing with `npm install` just run:
npm run syntaxCheck

@ -4,6 +4,7 @@
"dependencies": {},
"devDependencies": {
"atob": "^2.1.2",
"babel-cli": "^6.26.0",
"btoa": "^1.2.1",
"chai": "*",
"chai-as-promised": "*",
@ -13,6 +14,7 @@
"xhr2": "^0.1.4"
},
"scripts": {
"test": "./node_modules/.bin/mocha tests/unit/*.js tests/features/*.js"
"test": "./node_modules/.bin/mocha tests/unit/*.js tests/features/*.js",
"syntaxCheck": "./node_modules/.bin/babel chrome -d /tmp/babelOutput"
}
}

Loading…
Cancel
Save