Browse Source

add a command for static syntax check with babel.js

1.1.101
francesco 2 years ago
parent
commit
4874abf097
2 changed files with 11 additions and 2 deletions
  1. +8
    -1
      README.md
  2. +3
    -1
      package.json

+ 8
- 1
README.md View File

@ -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

+ 3
- 1
package.json View File

@ -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