mirror of
https://github.com/airbnb/javascript.git
synced 2026-01-13 21:38:03 -05:00
[Tests] add pretravis/posttravis scripts
This commit is contained in:
@@ -12,7 +12,7 @@ install:
|
||||
- 'cd "packages/${PACKAGE}"'
|
||||
- 'if [ "${TRAVIS_NODE_VERSION}" = "0.6" ]; then nvm install 0.8 && npm install -g npm@1.3 && npm install -g npm@1.4.28 && npm install -g npm@2 && npm install && nvm use "${TRAVIS_NODE_VERSION}"; else npm install; fi;'
|
||||
script:
|
||||
- 'if [ -n "${PREPUBLISH-}" ]; then npm run prepublish; else npm run travis; fi'
|
||||
- 'if [ -n "${PREPUBLISH-}" ]; then npm run pretravis && npm run prepublish && npm run posttravis; else npm run travis; fi'
|
||||
sudo: false
|
||||
env:
|
||||
matrix:
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
"prepublish": "(in-install || eslint-find-rules --unused) && (not-in-publish || npm test) && safe-publish-latest",
|
||||
"pretest": "npm run --silent lint",
|
||||
"test": "npm run --silent tests-only",
|
||||
"travis": "npm run --silent test"
|
||||
"pretravis": ":",
|
||||
"travis": "npm run --silent test",
|
||||
"posttravis": ":"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
@@ -10,7 +10,9 @@
|
||||
"prepublish": "(in-install || eslint-find-rules --unused) && (not-in-publish || npm test) && safe-publish-latest",
|
||||
"pretest": "npm run --silent lint",
|
||||
"test": "npm run --silent tests-only",
|
||||
"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 &"
|
||||
"pretravis": "cd ../eslint-config-airbnb-base && npm install && npm link && cd - && npm link --no-save eslint-config-airbnb-base",
|
||||
"travis": "npm run --silent test",
|
||||
"posttravis": "npm unlink eslint-config-airbnb-base >/dev/null &"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user