Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fc7fae6

Browse files
committed
[Tests] add pretravis/posttravis scripts
1 parent 7768e01 commit fc7fae6

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ install:
1212
- 'cd "packages/${PACKAGE}"'
1313
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g [email protected] && npm install -g [email protected] && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
1414
script:
15-
- 'if [ -n "${PREPUBLISH-}" ]; then npm run prepublish; else npm run travis; fi'
15+
- 'if [ -n "${PREPUBLISH-}" ]; then npm run pretravis && npm run prepublish && npm run posttravis; else npm run travis; fi'
1616
sudo: false
1717
env:
1818
matrix:

packages/eslint-config-airbnb-base/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"prepublish": "(in-install || eslint-find-rules --unused) && (not-in-publish || npm test) && safe-publish-latest",
1111
"pretest": "npm run --silent lint",
1212
"test": "npm run --silent tests-only",
13-
"travis": "npm run --silent test"
13+
"pretravis": ":",
14+
"travis": "npm run --silent test",
15+
"posttravis": ":"
1416
},
1517
"repository": {
1618
"type": "git",

packages/eslint-config-airbnb/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
"prepublish": "(in-install || eslint-find-rules --unused) && (not-in-publish || npm test) && safe-publish-latest",
1111
"pretest": "npm run --silent lint",
1212
"test": "npm run --silent tests-only",
13-
"travis": "cd ../eslint-config-airbnb-base && npm install && npm link && cd - && npm link eslint-config-airbnb-base && npm run --silent test ; npm unlink eslint-config-airbnb-base >/dev/null &"
13+
"pretravis": "cd ../eslint-config-airbnb-base && npm install && npm link && cd - && npm link --no-save eslint-config-airbnb-base",
14+
"travis": "npm run --silent test",
15+
"posttravis": "npm unlink eslint-config-airbnb-base >/dev/null &"
1416
},
1517
"repository": {
1618
"type": "git",

0 commit comments

Comments
 (0)