Skip to content
This repository was archived by the owner on Apr 30, 2018. It is now read-only.

Commit fddaae2

Browse files
author
Kent C. Dodds
committed
chore(release): Add semantic-release
Update the package.json, add a .travis.yml, update script tags closes #444
1 parent 2ee6191 commit fddaae2

File tree

2 files changed

+39
-12
lines changed

2 files changed

+39
-12
lines changed

.travis.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
sudo: false
2+
language: node_js
3+
cache:
4+
directories:
5+
- node_modules
6+
notifications:
7+
email: false
8+
node_js:
9+
- iojs
10+
before_install:
11+
- npm i -g npm@^2.0.0
12+
before_script:
13+
- npm prune
14+
script:
15+
- npm run code-checks
16+
- npm run test
17+
- npm run test:ci
18+
- npm run check-coverage
19+
after_success:
20+
- npm run report-coverage
21+
- npm run semantic-release

package.json

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "angular-formly",
3-
"version": "6.23.7",
3+
"version": "0.0.0-semantically-released.0",
44
"author": "Astrism <[email protected]>",
55
"contributors": [
66
"Astrism <[email protected]>",
@@ -9,26 +9,26 @@
99
"homepage": "http://formly-js.github.io/angular-formly/",
1010
"repository": {
1111
"type": "git",
12-
"url": "git://github.com/formly-js/angular-formly.git"
12+
"url": "https://github.com/formly-js/angular-formly.git"
1313
},
1414
"main": "dist/formly.js",
1515
"license": "MIT",
1616
"scripts": {
1717
"build:dist": "better-npm-run build:dist",
1818
"build:prod": "better-npm-run build:prod",
1919
"build": "npm run build:dist & npm run build:prod",
20-
"test": "better-npm-run test",
20+
"test": "better-npm-run test test:single",
2121
"test:mac": "COVERAGE=true NODE_ENV=test karma start",
22-
"test:single": "better-npm-run test:single",
22+
"test:watch": "better-npm-run test",
2323
"test:debug": "better-npm-run test:debug",
2424
"test:ci": "better-npm-run test:ci",
25-
"start:linux": "NODE_ENV=test COVERAGE=true karma start",
26-
"start": "npm run test",
25+
"start:mac": "npm run test:mac",
26+
"start": "npm run test:watch",
2727
"check-coverage": "istanbul check-coverage --statements 93 --branches 89 --functions 92 --lines 92",
28+
"report-coverage": "cat ./coverage/lcov.info | node_modules/.bin/codecov",
2829
"code-checks": "eslint src/ --quiet",
29-
"release": "npm run build && with-package git commit -am pkg.version && with-package git tag pkg.version && git push && npm publish && git push --tags",
30-
"release:beta": "npm run release && npm run tag:beta",
31-
"tag:beta": "with-package npm dist-tag add [email protected] beta"
30+
"commit": "git-cz",
31+
"semantic-release": "semantic-release pre && npm run build && npm publish && semantic-release post"
3232
},
3333
"betterScripts": {
3434
"build:dist": {
@@ -43,14 +43,14 @@
4343
},
4444
"command": "webpack --config node_modules/kcd-common-tools/shared/webpack.config.js --progress --colors"
4545
},
46-
"test": {
46+
"test:watch": {
4747
"env": {
4848
"COVERAGE": "true",
4949
"NODE_ENV": "test"
5050
},
5151
"command": "karma start"
5252
},
53-
"test:single": {
53+
"test": {
5454
"env": {
5555
"COVERAGE": "true",
5656
"NODE_ENV": "test"
@@ -72,7 +72,7 @@
7272
},
7373
"config": {
7474
"ghooks": {
75-
"pre-commit": "npm run code-checks && npm run test:single && npm run check-coverage"
75+
"pre-commit": "npm run code-checks && npm run test && npm run check-coverage"
7676
}
7777
},
7878
"description": "AngularJS directive which takes JSON representing a form and renders to HTML",
@@ -91,6 +91,8 @@
9191
"better-npm-run": "benoror/better-npm-run#0.0.1",
9292
"chai": "3.2.0",
9393
"codecov.io": "0.1.5",
94+
"commitizen": "1.0.4",
95+
"cz-conventional-changelog": "1.1.0",
9496
"eslint": "0.24.1",
9597
"eslint-loader": "0.14.2",
9698
"eslint-plugin-mocha": "0.4.0",
@@ -115,6 +117,7 @@
115117
"ng-annotate-loader": "0.0.6",
116118
"node-libs-browser": "0.5.2",
117119
"raw-loader": "0.5.1",
120+
"semantic-release": "^4.3.4",
118121
"sinon": "1.15.4",
119122
"sinon-chai": "2.8.0",
120123
"uglify-loader": "1.2.0",
@@ -129,5 +132,8 @@
129132
"kcdCommon": {
130133
"webpack": "scripts/webpack-overrides.js",
131134
"karma": "scripts/karma-overrides.js"
135+
},
136+
"czConfig": {
137+
"path": "node_modules/cz-conventional-changelog"
132138
}
133139
}

0 commit comments

Comments
 (0)