Skip to content

Commit 32b8a2e

Browse files
committed
feat: add travis ci and semantic release
1 parent a154143 commit 32b8a2e

File tree

3 files changed

+33
-4
lines changed

3 files changed

+33
-4
lines changed

.travis.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
language: node_js
2+
cache:
3+
directories:
4+
- ~/.npm
5+
- node_modules
6+
notifications:
7+
email: true
8+
node_js:
9+
- '8'
10+
before_script:
11+
- npm prune
12+
script:
13+
- npm test
14+
- npm run e2e
15+
after_success:
16+
- npm run semantic-release
17+
branches:
18+
except:
19+
- /^v\d+\.\d+\.\d+$/

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ If you are using [json-server](https://github.com/typicode/json-server), add thi
2222

2323
```json
2424
{
25-
todos: []
25+
"todos": []
2626
}
2727
```
2828

package.json

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "json-server-reset",
33
"description": "Reset middleware for json-server",
4-
"version": "1.0.0",
4+
"version": "0.0.0-development",
55
"author": "Gleb Bahmutov <gleb.bahmutov@gmail.com>",
66
"bugs": "https://github.com/bahmutov/json-server-reset/issues",
77
"config": {
@@ -65,25 +65,35 @@
6565
"cy:open": "cypress open",
6666
"cy:run": "cypress run",
6767
"start": "json-server cypress/fixtures/data.json --middlewares ./src/index.js",
68-
"e2e": "start-server-and-test start http://localhost:3000 cy:run"
68+
"e2e": "start-server-and-test start http://localhost:3000 cy:run",
69+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
6970
},
7071
"release": {
71-
"analyzeCommits": "simple-commit-message"
72+
"analyzeCommits": "simple-commit-message",
73+
"generateNotes": "github-post-release",
74+
"verifyRelease": {
75+
"path": "dont-crack",
76+
"test-against": []
77+
}
7278
},
7379
"devDependencies": {
7480
"ban-sensitive-files": "1.9.2",
7581
"check-more-types": "2.24.0",
7682
"cypress": "1.1.2",
7783
"dependency-check": "2.9.1",
7884
"deps-ok": "1.2.1",
85+
"dont-crack": "1.2.1",
7986
"git-issues": "1.3.1",
87+
"github-post-release": "1.13.1",
8088
"json-server": "0.12.1",
8189
"lazy-ass": "1.6.0",
8290
"license-checker": "15.0.0",
8391
"mocha": "4.0.1",
8492
"nsp": "3.1.0",
8593
"pre-git": "3.16.0",
8694
"prettier-standard": "7.0.3",
95+
"semantic-release": "8.2.0",
96+
"simple-commit-message": "3.3.2",
8797
"standard": "10.0.3",
8898
"start-server-and-test": "1.0.0"
8999
}

0 commit comments

Comments
 (0)