Skip to content

Commit 8444982

Browse files
committed
Update build and test scripts
1 parent a83b7c7 commit 8444982

5 files changed

Lines changed: 48 additions & 17 deletions

File tree

.babelrc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
11
{
2-
"presets": ["es2015", "stage-0"]
2+
"presets": ["es2015", "stage-0"],
3+
"env": {
4+
"test": {
5+
"plugins": [
6+
"istanbul"
7+
]
8+
}
9+
}
310
}

.eslintrc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"extends": "trendmicro",
3+
"parser": "babel-eslint",
4+
"env": {
5+
"browser": true,
6+
"node": true
7+
}
8+
}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules
2+
/.nyc_output
23
/lib
34
/coverage

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,3 @@ node_js:
66
- '4'
77
after_success:
88
- npm run coveralls
9-
- npm run coverage-clean

package.json

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gcode-toolpath",
3-
"version": "1.2.0",
3+
"version": "1.3.0",
44
"description": "G-code Toolpath Generator",
55
"author": "Cheton Wu <cheton@gmail.com>",
66
"homepage": "https://github.com/cncjs/gcode-toolpath",
@@ -17,27 +17,43 @@
1717
"gcode"
1818
],
1919
"scripts": {
20-
"prepublish": "npm run build && npm test",
21-
"build": "gulp",
22-
"test": "gulp test",
23-
"coverage": "istanbul cover node_modules/mocha/bin/_mocha -- --require babel-core/register -R spec",
24-
"coverage-clean": "rm -rf ./coverage",
20+
"prepublish": "npm run eslint && npm run build && npm test",
21+
"eslint": "eslint src",
22+
"build": "babel --out-dir ./lib ./src",
23+
"test": "cross-env NODE_ENV=test nyc mocha",
2524
"coveralls": "cat ./coverage/lcov.info | ./node_modules/.bin/coveralls"
2625
},
2726
"main": "lib/index.js",
2827
"dependencies": {
29-
"gcode-interpreter": "^1.2.0"
28+
"gcode-interpreter": "^1.3.0"
3029
},
3130
"devDependencies": {
32-
"babel-core": "^6.26.0",
31+
"babel-cli": "^6.26.0",
32+
"babel-eslint": "^8.0.1",
33+
"babel-plugin-istanbul": "^4.1.5",
3334
"babel-preset-es2015": "^6.24.1",
3435
"babel-preset-stage-0": "^6.24.1",
35-
"chai": "^3.5.0",
36-
"coveralls": "^2.13.2",
37-
"gulp": "^3.9.1",
38-
"gulp-babel": "^7.0.0",
39-
"gulp-istanbul": "^1.1.2",
40-
"gulp-mocha": "^4.3.1",
41-
"mocha": "^3.5.3"
36+
"babel-register": "^6.26.0",
37+
"chai": "^4.1.2",
38+
"coveralls": "^3.0.0",
39+
"cross-env": "^5.0.5",
40+
"eslint": "^4.7.2",
41+
"eslint-config-trendmicro": "^1.0.0",
42+
"eslint-plugin-import": "^2.7.0",
43+
"eslint-plugin-jsx-a11y": "^5.1.1",
44+
"eslint-plugin-react": "^7.4.0",
45+
"mocha": "^3.5.3",
46+
"nyc": "^11.2.1"
47+
},
48+
"nyc": {
49+
"require": [
50+
"babel-register"
51+
],
52+
"reporter": [
53+
"lcov",
54+
"text"
55+
],
56+
"sourceMap": false,
57+
"instrument": false
4258
}
4359
}

0 commit comments

Comments
 (0)