diff --git a/.travis.yml b/.travis.yml index 4909f83..eddb78b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,11 @@ language: node_js node_js: - "6" + - "5" + - "4" +cache: + directories: + - node_modules +branches: + only: + - master \ No newline at end of file diff --git a/README.md b/README.md index 584d132..a7ca452 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,7 @@ The main purpose of this router is to mirror your browser history to the redux s * [``](#fragment) * [``](#link) * [Examples](#examples) + * [Contributing](#contributing) * [License](#license) @@ -454,5 +455,10 @@ We provide a basic example of working React app that you can dig into. Just clon ```bash npm run build-examples ``` + +## Contributing + +* Provide [conventional commit messages](https://github.com/conventional-changelog/conventional-changelog-angular/blob/master/convention.md) by using `npm run commit` instead of `git commit`. + ## License MIT © AuRu diff --git a/package.json b/package.json index e9ff31d..0fc2b3f 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,13 @@ "build-umd": "./node_modules/.bin/webpack --bail --config config/webpack/umd.js", "build-umd-min": "./node_modules/.bin/webpack --bail --config config/webpack/umd.min.js", "clean": "./node_modules/.bin/rimraf dist umd", + "commit": "./node_modules/.bin/git-cz", "lint": "./node_modules/.bin/eslint --ignore-path=.gitignore --fix ./src", "lint-prod": "NODE_ENV='production' npm run lint", - "precommit-msg": "echo 'Running pre-commit checks...' && exit 0", + "version": " ./node_modules/.bin/conventional-changelog -i CHANGELOG.md -s && git add CHANGELOG.md", "prepublish": "npm run build-package", + "precommit": "npm test", + "commitmsg": "./node_modules/.bin/validate-commit-msg", "test": "npm run lint-prod && ./node_modules/.bin/ava --verbose", "test-watch": "npm run lint && ./node_modules/.bin/ava --verbose --watch" }, @@ -55,14 +58,18 @@ "babel-preset-react": "^6.16.0", "babel-preset-stage-0": "^6.16.0", "babel-register": "^6.16.3", + "commitizen": "^2.8.6", + "conventional-changelog-cli": "^1.2.0", + "cz-conventional-changelog": "^1.2.0", "eslint": "^3.7.1", "eslint-plugin-ava": "^3.1.0", "eslint-plugin-react": "6.4.1", + "husky": "^0.11.9", "immutable": "^3.8.1", "jsdom": "^9.6.0", - "pre-commit": "^1.1.3", "react": "^15.3.2", "rimraf": "^2.5.4", + "validate-commit-msg": "^2.8.2", "webpack": "^1.13.2" }, "ava": { @@ -83,8 +90,9 @@ ], "babel": "inherit" }, - "pre-commit": [ - "precommit-msg", - "test" - ] + "config": { + "commitizen": { + "path": "./node_modules/cz-conventional-changelog" + } + } }