Skip to content
This repository was archived by the owner on Apr 10, 2023. It is now read-only.

Commit 8553499

Browse files
committed
feat(build): ✨Add prettier, traivs, code coverage
1 parent ad80209 commit 8553499

File tree

5 files changed

+1159
-43
lines changed

5 files changed

+1159
-43
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
.DS_Store
33

44
node_modules
5+
.nyc_output
6+
coverage.lcov
7+
coverage

.prettierignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CHANGELOG.md
2+
README.md
3+
package.json

.travis.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
language: node_js
2+
node_js:
3+
- "8"
4+
- "10"
5+
after_success:
6+
- bash <(curl -s https://codecov.io/bash)

package.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
"description": "JavaScript Complier and Executor",
55
"main": "index.js",
66
"scripts": {
7-
"test": "ava",
7+
"test": "nyc ava && nyc report --reporter=html && nyc report --reporter=lcov > coverage.lcov",
88
"release:beta": "npm test && standard-version --prerelease beta && npm publish --tag beta && git push --follow-tags",
9-
"release": "npm test && standard-version && npm publish && git push --follow-tags"
9+
"release": "npm test && standard-version && npm publish && git push --follow-tags",
10+
"precommit": "lint-staged"
1011
},
1112
"repository": {
1213
"type": "git",
@@ -23,6 +24,16 @@
2324
"fs-extra": "^7.0.0",
2425
"glob": "^7.1.2",
2526
"glob-promise": "^3.4.0",
27+
"husky": "^0.14.3",
28+
"lint-staged": "^7.2.0",
29+
"nyc": "^12.0.2",
30+
"prettier": "^1.14.0",
2631
"standard-version": "^4.4.0"
32+
},
33+
"lint-staged": {
34+
"**/**.{js,json,md}": [
35+
"prettier --write",
36+
"git add"
37+
]
2738
}
2839
}

0 commit comments

Comments
 (0)