Skip to content

Commit adb1acd

Browse files
committed
Modify npm scripts
- Auto-format in npm test - Run seperate script on the CI
1 parent d07e9f7 commit adb1acd

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,7 @@ node_js:
44
- node
55
- 6
66
- 4
7+
script:
8+
- npm run ci
79
after_success:
810
- './node_modules/.bin/nyc report --reporter=text-lcov | ./node_modules/.bin/coveralls'

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ install:
1515
test_script:
1616
- node --version
1717
- npm --version
18-
- npm test
18+
- npm run ci

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,10 @@
1010
"postcss": "./bin/postcss"
1111
},
1212
"scripts": {
13+
"ci": "eslint . && nyc ava -v",
1314
"clean": "node test/helpers/clean.js",
14-
"lint": "eslint .",
15-
"pretest": "npm run clean && npm run lint",
15+
"format": "eslint . --fix",
16+
"pretest": "npm run clean && npm run format",
1617
"test": "nyc ava -v"
1718
},
1819
"dependencies": {
@@ -37,6 +38,7 @@
3738
"eslint-config-problems": "0.0.2",
3839
"eslint-plugin-prettier": "^2.1.2",
3940
"nyc": "^11.0.2",
41+
"per-env": "^1.0.2",
4042
"postcss-import": "^10.0.0",
4143
"prettier": "^1.5.3",
4244
"standard": "^10.0.2",

0 commit comments

Comments
 (0)