Skip to content

Commit 02ef2c5

Browse files
Merge pull request #49 from JaKXz/chore/coverage
More small wins
2 parents 35c8179 + 79ce653 commit 02ef2c5

File tree

6 files changed

+600
-105
lines changed

6 files changed

+600
-105
lines changed

.babelrc

+8-1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,12 @@
88
"transform-object-rest-spread",
99
"transform-es2015-spread",
1010
"transform-export-extensions"
11-
]
11+
],
12+
"env": {
13+
"test": {
14+
"plugins": [
15+
"istanbul"
16+
]
17+
}
18+
}
1219
}

.editorconfig

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
root = true
2+
3+
[*]
4+
5+
# Change these settings to your own preference
6+
indent_style = space
7+
indent_size = 2
8+
9+
# We recommend you to keep these unchanged
10+
end_of_line = lf
11+
charset = utf-8
12+
trim_trailing_whitespace = true
13+
insert_final_newline = true
14+
15+
[*.md]
16+
trim_trailing_whitespace = false

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,10 @@ Icon
5656
# Thumbnails
5757
._*
5858

59+
# code coverage
60+
.nyc_output
61+
coverage
62+
5963
# Files that might appear in the root of a volume
6064
.DocumentRevisions-V100
6165
.fseventsd

.nycrc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"require": [
3+
"babel-core/register"
4+
],
5+
"sourceMap": false,
6+
"instrument": false
7+
}

package.json

+7-4
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
"description": "Transform required css modules so one can use generated class names.",
55
"main": "build/index.js",
66
"scripts": {
7-
"build": "node node_modules/.bin/babel src --ignore **/*.spec.js -d build",
8-
"lint": "node node_modules/.bin/eslint src",
7+
"build": "babel src --ignore **/*.spec.js -d build",
8+
"lint": "eslint src",
99
"pretest": "npm run lint",
10-
"test": "mocha"
10+
"test": "cross-env NODE_ENV=test nyc mocha"
1111
},
1212
"repository": {
1313
"type": "git",
@@ -33,6 +33,7 @@
3333
"babel-cli": "^6.22.2",
3434
"babel-core": "^6.22.1",
3535
"babel-eslint": "^7.1.1",
36+
"babel-plugin-istanbul": "^4.1.3",
3637
"babel-plugin-transform-es2015-block-scoping": "^6.22.0",
3738
"babel-plugin-transform-es2015-destructuring": "^6.22.0",
3839
"babel-plugin-transform-es2015-modules-commonjs": "^6.22.0",
@@ -43,11 +44,13 @@
4344
"babel-plugin-transform-strict-mode": "^6.22.0",
4445
"babel-preset-es2015": "^6.22.0",
4546
"chai": "^3.4.1",
47+
"cross-env": "^5.0.0",
4648
"eslint": "^1.9.0",
4749
"eslint-config-airbnb-lite": "^1.0.0",
4850
"gulp-babel": "^6.1.2",
4951
"gulp-util": "^3.0.7",
50-
"mocha": "^2.3.4",
52+
"mocha": "^3.4.2",
53+
"nyc": "^10.3.2",
5154
"postcss": "^5.x",
5255
"postcss-modules-extract-imports": "^1.x",
5356
"postcss-modules-local-by-default": "^1.x",

0 commit comments

Comments
 (0)