Skip to content

Commit 687d17c

Browse files
committed
feat(JSX Harmony): integration of the building tools
integrate semantic release with coverage and babel closes #2
1 parent 97a4018 commit 687d17c

7 files changed

Lines changed: 41 additions & 11 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
node_modules
22
.idea
3+
dist
4+
coverage

.travis.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,11 @@ before_script:
1313
- npm prune
1414
script:
1515
- npm run test:single
16+
- npm run build
1617
after_success:
1718
- npm run semantic-release
1819
branches:
19-
except:
20-
- "/^v\\d+\\.\\d+\\.\\d+$/"
20+
only:
21+
- master
22+
# except:
23+
# - "/^v\\d+\\.\\d+\\.\\d+$/"

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,9 @@
11
# radial-progress
22
a radial progress bar in react js and SVG
3+
4+
[![travis build](https://img.shields.io/travis/samidarko/react-radial-progress.svg?style=flat-square)](https://travis-ci.org/samidarko/react-radial-progress)
5+
[![codecov coverage](https://img.shields.io/codecov/c/github/samidarko/react-radial-progress.svg?style=flat-square)](https://codecov.io/github/samidarko/react-radial-progress)
6+
[![version](https://img.shields.io/npm/v/react-radial-progress.svg?style=flat-square)](http://npm.im/react-radial-progress)
7+
[![downloads](https://img.shields.io/npm/dm/react-radial-progress.svg?style=flat-square)](http://npm-stat.com/charts.html?package=react-radial-progress&from=2015-08-01)
8+
[![MIT License](https://img.shields.io/npm/l/react-radial-progress.svg?style=flat-square)](http://opensource.org/licenses/MIT)
9+
[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg?style=flat-square)](https://github.com/semantic-release/semantic-release)

package.json

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,15 @@
22
"name": "react-radial-progress",
33
"version": "0.0.0-semantically-released",
44
"description": "a radial progress bar in react js and SVG",
5-
"main": "src/index.js",
5+
"main": "dist/index.js",
66
"scripts": {
7+
"prebuild": "rm -rf dist && mkdir dist",
8+
"build": "babel src/RadialProgress.js -o dist/index.js",
79
"commit": "git-cz",
8-
"test": "mocha src/index_test.js -w",
9-
"test:single": "mocha src/index_test.js",
10+
"check-coverage": "istanbul check-coverage --statements 100 --branches 100 --functions 100 --lines 100",
11+
"report-coverage": "cat ./coverage/lcov.info | codecov",
12+
"test": "mocha src/index_test.js -w --compilers js:babel/register",
13+
"test:single": "istanbul cover -x *_test.js _mocha -- -R spec src/index_test.js --compilers js:babel/register",
1014
"semantic-release": "semantic-release pre && npm publish && semantic-release post"
1115
},
1216
"repository": {
@@ -27,11 +31,16 @@
2731
},
2832
"homepage": "https://github.com/samidarko/react-radial-progress#readme",
2933
"devDependencies": {
34+
"babel": "5.8.21",
3035
"chai": "3.4.0",
36+
"codecov": "1.0.1",
3137
"commitizen": "2.3.0",
3238
"cz-conventional-changelog": "1.1.4",
3339
"ghooks": "0.3.2",
40+
"istanbul": "0.4.0",
3441
"mocha": "2.3.3",
42+
"react": "0.14.1",
43+
"react-addons-test-utils": "0.14.1",
3544
"semantic-release": "^4.3.5"
3645
},
3746
"czConfig": {

src/RadialProgress.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
import AuthenticatedComponent from '../containers/AuthenticatedComponent';
32

43
function clamp (n, min, max) {
54
return Math.max(min, Math.min(max, n));

src/index.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

src/index_test.js

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,18 @@
1-
var expect = require('chai').expect;
1+
import { expect } from 'chai';
2+
import RadialProgress from './RadialProgress'
3+
import React from 'react';
4+
import ReactTestUtils from 'react-addons-test-utils';
5+
26

37
describe('react-radial-progress', function () {
4-
it('it should load without any problems', function () {
5-
expect(true).to.be.true;
6-
});
8+
it('it should load without any problems', function () {
9+
let renderer = ReactTestUtils.createRenderer();
10+
let props = {
11+
value: 100
12+
};
13+
renderer.render(<RadialProgress ref="app" {...props} />);
14+
let output = renderer.getRenderOutput();
15+
//console.log(output)
16+
expect(output.type).to.be.equal('svg');
17+
});
718
});

0 commit comments

Comments
 (0)