Skip to content

Commit e8cd41e

Browse files
committed
chore(build): Add semantic-release, setup travis, add badges, and coverage..
1 parent 6bd33c4 commit e8cd41e

File tree

3 files changed

+68
-7
lines changed

3 files changed

+68
-7
lines changed

.travis.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
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+
- npm i graphql graphql-compose
18+
before_script:
19+
- npm prune
20+
script:
21+
- npm run coverage
22+
- npm run build
23+
after_success:
24+
- 'curl -Lo travis_after_all.py https://git.io/travis_after_all'
25+
- python travis_after_all.py
26+
- export $(cat .to_export_back) &> /dev/null
27+
- bash <(curl -s https://codecov.io/bash)
28+
- npm run semantic-release
29+
branches:
30+
only:
31+
- master

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
1-
graphql-compose-relay
2-
======================
1+
# graphql-compose-relay
2+
3+
[![travis build](https://img.shields.io/travis/nodkz/graphql-compose-relay.svg)](https://travis-ci.org/nodkz/graphql-compose-relay)
4+
[![codecov coverage](https://img.shields.io/codecov/c/github/nodkz/graphql-compose-relay.svg)](https://codecov.io/github/nodkz/graphql-compose-relay)
5+
[![](https://img.shields.io/npm/v/graphql-compose-relay.svg)](https://www.npmjs.com/package/graphql-compose-relay)
6+
[![npm](https://img.shields.io/npm/dt/graphql-compose-relay.svg)](https://www.npmjs.com/package/graphql-compose-relay)
7+
[![Join the chat at https://gitter.im/graphql-compose/Lobby](https://badges.gitter.im/nodkz/graphql-compose.svg)](https://gitter.im/graphql-compose/Lobby)
8+
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
9+
10+
311
This is a plugin for [graphql-compose](https://github.com/nodkz/graphql-compose), which wraps GraphQL types with Relay specific things, like `Node` type and interface, `globalId`, `clientMutationId`.
412

513
Live demo: [https://graphql-compose.herokuapp.com/](https://graphql-compose.herokuapp.com/)

package.json

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "graphql-compose-relay",
3-
"version": "1.0.8",
3+
"version": "0.0.0-semantically-released",
44
"description": "Plugin for `graphql-compose` which wraps graphql types with Relay specific logic.",
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-relay.git"
13+
"url": "https://github.com/nodkz/graphql-compose-relay.git"
1414
},
1515
"keywords": [
1616
"graphql",
@@ -28,6 +28,7 @@
2828
},
2929
"devDependencies": {
3030
"babel-cli": "6.14.0",
31+
"babel-core": "6.14.0",
3132
"babel-eslint": "6.1.2",
3233
"babel-plugin-syntax-async-functions": "6.13.0",
3334
"babel-plugin-transform-class-properties": "6.11.5",
@@ -39,6 +40,7 @@
3940
"chai": "3.5.0",
4041
"chai-as-promised": "5.3.0",
4142
"chai-spies": "0.7.1",
43+
"cz-conventional-changelog": "1.2.0",
4244
"eslint": "3.4.0",
4345
"eslint-config-airbnb": "10.0.1",
4446
"eslint-plugin-flowtype": "2.15.0",
@@ -47,21 +49,41 @@
4749
"eslint-plugin-react": "6.2.0",
4850
"flow-bin": "0.32.0",
4951
"mocha": "3.0.2",
52+
"nyc": "8.1.0",
5053
"rimraf": "2.5.4",
51-
"sane": "1.4.1"
54+
"sane": "1.4.1",
55+
"semantic-release": "^4.3.5"
5256
},
5357
"scripts": {
5458
"build": "npm run build-cjs && npm run build-flow && npm run build-es",
5559
"build-cjs": "rimraf lib && babel src --ignore __tests__,__mocks__ -d lib",
5660
"build-es": "rimraf es && BABEL_ENV=es babel src --ignore __tests__,__mocks__ -d es",
5761
"build-flow": "find ./src -name '*.js' -not -path '*/__*' | while read filepath; do cp $filepath `echo $filepath | sed 's/\\/src\\//\\/lib\\//g'`.flow; done",
62+
"coverage": "nyc npm run test",
5863
"lint": "eslint src test *.js",
59-
"prepublish": "npm run test && npm run build",
6064
"test": "babel-node ./node_modules/.bin/_mocha --compilers js:babel-core/register --reporter dot --require ./resources/mocha-bootload src/**/__tests__/**/*-test.js",
6165
"watch": "babel-node ./resources/watch.js",
62-
"link": "npm link graphql && npm link graphql-compose && npm link"
66+
"link": "npm link graphql && npm link graphql-compose && npm link",
67+
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
6368
},
6469
"dependencies": {
6570
"babel-runtime": "6.11.6"
71+
},
72+
"config": {
73+
"commitizen": {
74+
"path": "./node_modules/cz-conventional-changelog"
75+
}
76+
},
77+
"nyc": {
78+
"exclude": [
79+
"**/__mocks__/**",
80+
"**/__tests__/**",
81+
"resources",
82+
"node_modules"
83+
],
84+
"reporter": [
85+
"lcov",
86+
"text"
87+
]
6688
}
6789
}

0 commit comments

Comments
 (0)