Skip to content

Commit 508deb8

Browse files
committed
Add Makefile and coverage
1 parent 3cea064 commit 508deb8

File tree

6 files changed

+50
-29
lines changed

6 files changed

+50
-29
lines changed

.babelrc

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
"development": {
55
"presets": [ "react-hmre" ]
66
},
7-
"test": {
8-
"presets": []
7+
"cover": {
8+
"plugins": ["istanbul"]
99
}
1010
},
1111
"plugins": [

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ lib
44
node_modules
55
npm-debug.log
66
test-reports.xml
7+
.nyc_output

.npmignore

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.storybook
2-
components
3-
babelPlugins
2+
.editorconfig
3+
.nycrc
4+
src
45
test
5-
Dockerfile
6-
webpack.config.js

.nycrc

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"sourceMap": false,
3+
"instrument": false,
4+
"reporter": [
5+
"lcov",
6+
"text-summary"
7+
]
8+
}

Makefile

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
.PHONY: clean test lint
2+
3+
SHELL := /bin/bash
4+
PATH := ./node_modules/.bin:$(PATH)
5+
MOCHA_OPTS = --require ./test/.setup.js --recursive test
6+
7+
all: node_modules
8+
9+
node_modules: package.json
10+
npm install
11+
touch $@
12+
13+
run:
14+
start-storybook -p 9002
15+
16+
clean:
17+
rm -rf node_modules
18+
19+
lint:
20+
lfeslint
21+
22+
test: lint
23+
NODE_ENV=test mocha $(MOCHA_OPTS)
24+
25+
cover:
26+
NODE_ENV=test BABEL_ENV=cover nyc mocha $(MOCHA_OPTS)

package.json

+10-23
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,14 @@
11
{
2-
"name": "@coralui/react-coral",
3-
"version": "0.19.0",
4-
"description": "React components using cloudui style guidelines from CoralUI",
2+
"name": "react-spectrum",
3+
"version": "1.0.0",
4+
"description": "Spectrum UI components in React",
55
"repository": {
66
"type": "git",
7-
"url": "https://git.corp.adobe.com/React/react-coral"
8-
},
9-
"publishConfig": {
10-
"registry": "https://artifactory.corp.adobe.com/artifactory/api/npm/npm-coralui-local"
7+
"url": "https://github.com/Livefyre/react-spectrum"
118
},
129
"scripts": {
13-
"prepublish": "NODE_ENV=production babel src --out-dir lib",
14-
"start": "start-storybook -p 9002",
15-
"lint": "lfeslint",
16-
"test": "NODE_ENV=test mocha test/.setup.js test/",
17-
"test:xml": "export NODE_ENV=test|| set NODE_ENV=test&& mocha -R xunit test/.setup.js test/ > test-reports.xml",
18-
"test:watch": "npm test -- --watch",
19-
"coverage": "export NODE_ENV=test|| set NODE_ENV=test&& istanbul cover --report cobertura --report html _mocha -- -R dot test/.setup.js test/"
10+
"start": "make run",
11+
"test": "make test"
2012
},
2113
"main": "lib/index.js",
2214
"peerDependencies": {
@@ -37,7 +29,8 @@
3729
},
3830
"bundledDependencies": [
3931
"@coralui/coralui-core",
40-
"@spectrum/spectrum-abstract-stylus"
32+
"@spectrum/spectrum-abstract-stylus",
33+
"react-select"
4134
],
4235
"devDependencies": {
4336
"@kadira/react-storybook-addon-info": "^3.2.4",
@@ -46,8 +39,8 @@
4639
"babel": "^6.5.2",
4740
"babel-cli": "^6.16.0",
4841
"babel-core": "^6.17.0",
49-
"babel-eslint": "^7.0.0",
5042
"babel-loader": "^6.2.5",
43+
"babel-plugin-istanbul": "^4.1.1",
5144
"babel-plugin-syntax-class-properties": "^6.13.0",
5245
"babel-plugin-syntax-decorators": "^6.13.0",
5346
"babel-plugin-syntax-object-rest-spread": "^6.13.0",
@@ -65,19 +58,13 @@
6558
"babel-runtime": "^6.11.6",
6659
"css-loader": "^0.25.0",
6760
"enzyme": "^2.5.1",
68-
"eslint": "^3.8.1",
69-
"eslint-config-airbnb": "^12.0.0",
70-
"eslint-plugin-import": "^2.0.1",
71-
"eslint-plugin-jsx-a11y": "^2.2.3",
72-
"eslint-plugin-react": "^6.4.1",
7361
"expect": "^1.20.2",
7462
"file-loader": "^0.9.0",
7563
"ignore-styles": "^5.0.1",
76-
"istanbul": "^1.0.0-alpha.2",
77-
"istanbul-cobertura-badger": "^1.2.1",
7864
"jsdom": "^9.8.0",
7965
"lfeslint": "^1.0.0",
8066
"mocha": "^3.1.2",
67+
"nyc": "^10.2.0",
8168
"react": "^15.3.2",
8269
"react-addons-test-utils": "^15.3.2",
8370
"react-dom": "^15.3.2",

0 commit comments

Comments
 (0)