Skip to content

Commit 4fb7bdd

Browse files
Merge pull request #29 from markusguenther/introduce-sematic-release
Build: Introduce sematic-release with commitizen
2 parents a929fd9 + f8b274c commit 4fb7bdd

File tree

5 files changed

+2942
-139
lines changed

5 files changed

+2942
-139
lines changed

.releaserc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"branch": "master",
3+
"analyzeCommits": {
4+
"preset": "eslint"
5+
}
6+
}

.travis.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,20 @@ language: node_js
22
sudo: false
33
cache:
44
directories:
5+
- ~/.npm
56
- node_modules
7+
notifications:
8+
email: false
69
node_js:
7-
- "node"
10+
- '10'
11+
- '9'
12+
- '8'
813
before_install:
914
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.9.4
1015
- export PATH="$HOME/.yarn/bin:$PATH"
1116
- yarn global add babel-cli
17+
after_success:
18+
- npm run travis-deploy-once "npm run semantic-release"
19+
branches:
20+
except:
21+
- /^v\d+\.\d+\.\d+$/

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
<a href="https://github.com/prettier/prettier">
1515
<img alt="code style: prettier" src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square">
1616
</a>
17+
<a href="https://github.com/semantic-release/semantic-release">
18+
<img alt="We are using semantic-release" src="https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square">
19+
</a>
1720
<a href="https://twitter.com/friendsofreact">
1821
<img alt="Follow friends of react on Twitter" src="https://img.shields.io/twitter/follow/friendsofreact.svg?label=follow+friendsofreact&style=flat-square">
1922
</a>
@@ -192,6 +195,28 @@ The returned component accepts a `theme`, `composeTheme`, `innerRef` and `mapThe
192195
- [`composeTheme = 'deeply'`] *(String)* allows to customize the way themes are merged or to disable merging completely. The accepted values are `deeply` to deeply merge themes, `softly` to softly merge themes and `false` to disable theme merging.
193196
- [`mapThemrProps = (props, theme) => ({ ref, theme })`] *(Function)* allows to customize how properties are passed down to the decorated component. By default, themr extracts all own properties passing down just `innerRef` as `ref` and the generated theme as `theme`. If you are decorating a component that needs to map the reference or any other custom property, this function is called with *all* properties given to the component plus the generated `theme` in the second parameter. It should return the properties you want to pass.
194197
198+
## Contribution
199+
200+
Contributions are always welcome. We try to make it as easy as possible.
201+
We are using semantic-release to have more time to concentrate on important stuff
202+
instead of struggling in the dependency or release hell.
203+
204+
Therefore the first rule is to follow the [eslint commit message guideline](https://github.com/conventional-changelog-archived-repos/conventional-changelog-eslint/blob/master/convention.md).
205+
When you always commit via `yarn commit` this is really easy. Commitizen will guide you.
206+
207+
### Development commands
208+
209+
We have some yarn scripts that should make live easier. The deployment scripts are just for
210+
semantic-release and travis, but the following will help you.
211+
212+
| Command | Description |
213+
| --------------- | ------------------------------ |
214+
| `yarn build` | Runs the development build. |
215+
| `yarn lint` | Executes linter, we use prettier with eslint. |
216+
| `yarn test` | Executes the jest test on all source files. |
217+
| `yarn test:watch` | Perfect while writing tests is the watcher for test. |
218+
| `yarn commit` | Executes commitizen to guide you for the correct commit message. |
219+
195220
## About
196221
197222
The project is originally authored by [Javi Velasco](https://twitter.com/javivelasco) as an effort of providing a better customization experience for [React Toolbox](http://react-toolbox.io). Any comments, improvements or feedback is highly appreciated.

package.json

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"author": "Javi Velasco <javier.velasco86@gmail.com> (http://javivelasco.com/)",
88
"repository": {
99
"type": "git",
10-
"url": "git+https://github.com/FriendsOfReactJS/react-css-themr.git"
10+
"url": "https://github.com/FriendsOfReactJS/react-css-themr.git"
1111
},
1212
"bugs": {
1313
"url": "https://github.com/FriendsOfReactJS/react-css-themr/issues"
@@ -33,6 +33,9 @@
3333
"babel-preset-es2015": "^6.24.1",
3434
"babel-preset-react": "^6.24.1",
3535
"babel-preset-stage-0": "^6.24.1",
36+
"commitizen": "^2.10.1",
37+
"conventional-changelog-eslint": "^3.0.0",
38+
"cz-adapter-eslint": "^0.1.2",
3639
"eslint": "^5.3.0",
3740
"eslint-config-prettier": "^3.0.0",
3841
"eslint-plugin-prettier": "^2.6.2",
@@ -45,7 +48,9 @@
4548
"react": "^16.4.2",
4649
"react-dom": "^16.4.2",
4750
"rimraf": "^2.6.2",
48-
"sinon": "^6.1.4"
51+
"semantic-release": "^15.9.8",
52+
"sinon": "^6.1.4",
53+
"travis-deploy-once": "^5.0.2"
4954
},
5055
"files": [
5156
"index.d.ts",
@@ -58,7 +63,10 @@
5863
"lint-check": "eslint --print-config .eslintrc.js | eslint-config-prettier-check",
5964
"prepublish": "rimraf lib && npm run build",
6065
"test": "jest",
61-
"test:watch": "npm test -- --watch"
66+
"test:watch": "npm test -- --watch",
67+
"travis-deploy-once": "travis-deploy-once",
68+
"semantic-release": "semantic-release",
69+
"commit": "git-cz"
6270
},
6371
"license": "MIT",
6472
"peerDependencies": {
@@ -72,5 +80,10 @@
7280
"jest": {
7381
"verbose": true,
7482
"testURL": "http://localhost/"
83+
},
84+
"config": {
85+
"commitizen": {
86+
"path": "./node_modules/cz-adapter-eslint"
87+
}
7588
}
7689
}

0 commit comments

Comments
 (0)