Skip to content

Commit de108e2

Browse files
committed
chore(build): Add travis config, conventional commits, and semantic-release.
1 parent 70e8fc9 commit de108e2

File tree

2 files changed

+41
-5
lines changed

2 files changed

+41
-5
lines changed

.travis.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
sudo: false
2+
language: node_js
3+
cache:
4+
directories:
5+
- node_modules
6+
notifications:
7+
email: false
8+
node_js:
9+
- "6"
10+
- "5"
11+
- "4"
12+
- "iojs"
13+
- "0.12"
14+
- "0.10"
15+
before_install:
16+
- npm i -g npm@^2.0.0
17+
before_script:
18+
- npm prune
19+
script:
20+
- npm run test
21+
after_success:
22+
- 'curl -Lo travis_after_all.py https://git.io/travis_after_all'
23+
- python travis_after_all.py
24+
- export $(cat .to_export_back) &> /dev/null
25+
- npm run semantic-release
26+
branches:
27+
except:
28+
- /^v\d+\.\d+\.\d+$/

package.json

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-compose-connection",
3-
"version": "1.0.8",
3+
"version": "0.0.0-semantically-released",
44
"description": "Plugin for `graphql-compose` which provide a connection resolver for types.",
55
"files": [
66
"es",
@@ -10,7 +10,7 @@
1010
"jsnext:main": "es/index.js",
1111
"repository": {
1212
"type": "git",
13-
"url": "git+https://github.com/nodkz/graphql-compose-connection.git"
13+
"url": "https://github.com/nodkz/graphql-compose-connection.git"
1414
},
1515
"keywords": [
1616
"graphql",
@@ -39,6 +39,7 @@
3939
"chai": "3.5.0",
4040
"chai-as-promised": "5.3.0",
4141
"chai-spies": "0.7.1",
42+
"cz-conventional-changelog": "1.2.0",
4243
"eslint": "3.4.0",
4344
"eslint-config-airbnb": "10.0.1",
4445
"eslint-plugin-flowtype": "2.15.0",
@@ -48,20 +49,27 @@
4849
"flow-bin": "0.32.0",
4950
"mocha": "3.0.2",
5051
"rimraf": "2.5.4",
51-
"sane": "1.4.1"
52+
"sane": "1.4.1",
53+
"semantic-release": "4.3.5"
5254
},
5355
"scripts": {
5456
"build": "npm run build-cjs && npm run build-flow && npm run build-es",
5557
"build-cjs": "rimraf lib && babel src --ignore __tests__,__mocks__ -d lib",
5658
"build-es": "rimraf es && BABEL_ENV=es babel src --ignore __tests__,__mocks__ -d es",
5759
"build-flow": "find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo $filepath | sed 's/\\/src\\//\\/lib\\//g'`.flow; done",
5860
"lint": "eslint src test *.js",
59-
"prepublish": "npm run test && npm run build",
61+
"prepublish": "npm run build",
6062
"test": "babel-node ./node_modules/.bin/_mocha --compilers js:babel-core/register --reporter dot --require ./resources/mocha-bootload src/**/__tests__/**/*-test.js",
6163
"watch": "babel-node ./resources/watch.js",
62-
"link": "npm link graphql && npm link graphql-compose && npm link"
64+
"link": "npm link graphql && npm link graphql-compose && npm link",
65+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
6366
},
6467
"dependencies": {
6568
"babel-runtime": "6.11.6"
69+
},
70+
"config": {
71+
"commitizen": {
72+
"path": "./node_modules/cz-conventional-changelog"
73+
}
6674
}
6775
}

0 commit comments

Comments
 (0)