Update build script to use lerna

This commit is contained in:
Enzo Cano 2018-08-15 15:38:27 -03:00
Родитель bd5db14dbb
Коммит fa9c3ce09b
4 изменённых файлов: 50 добавлений и 57 удалений

Просмотреть файл

@ -1,21 +1,30 @@
function install() {
echo Install $1
pushd $1
npm install
if [ $2 ]; then npm run test; fi
popd
}
#!/bin/bash
function eslint() {
echo Run ESLint for all packages
npm install
npm run eslint:travis
}
main() {
if [[ "${TRAVIS_EVENT_TYPE}" = "cron" ]]; then
publish Chatdown
publish Dispatch
publish Ludown
publish LUIS
publish LUISGen
publish MSBot
publish QnAMaker
else
(
set -e
npm install
npm run build
npm run eslint
npm run coverage
)
function coveralls() {
echo Run Coveralls Aggregated tests
npm install
npm run test:travis
fi
errorcode=$?
if [ $errorcode -ne 0 ]; then
echo exiting with errorcode $errorcode
exit $errorcode
fi
}
function create_npmrc() {
@ -42,34 +51,4 @@ function publish() {
popd
}
if [[ "${TRAVIS_EVENT_TYPE}" = "cron" ]]; then
publish Chatdown
publish Dispatch
publish Ludown
publish LUIS
publish LUISGen
publish MSBot
publish QnAMaker
else
(
set -e
install Chatdown with_test
install Dispatch
# Disable failing tests
install Ludown with_test
install LUIS with_test
install LUISGen
install MSBot
install QnAMaker with_test
eslint
coveralls
)
fi
errorcode=$?
if [ $errorcode -ne 0 ]; then
echo exiting with errorcode $errorcode
exit $errorcode
fi
main "$@"

Просмотреть файл

@ -2,5 +2,5 @@
"packages": [
"packages/*"
],
"version": "0.0.0"
"version": "independent"
}

28
package-lock.json сгенерированный
Просмотреть файл

@ -3432,12 +3432,14 @@
"balanced-match": {
"version": "1.0.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"brace-expansion": {
"version": "1.1.11",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"balanced-match": "^1.0.0",
"concat-map": "0.0.1"
@ -3452,17 +3454,20 @@
"code-point-at": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"concat-map": {
"version": "0.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"console-control-strings": {
"version": "1.1.0",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"core-util-is": {
"version": "1.0.2",
@ -3579,7 +3584,8 @@
"inherits": {
"version": "2.0.3",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"ini": {
"version": "1.3.5",
@ -3591,6 +3597,7 @@
"version": "1.0.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"number-is-nan": "^1.0.0"
}
@ -3605,6 +3612,7 @@
"version": "3.0.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"brace-expansion": "^1.1.7"
}
@ -3612,12 +3620,14 @@
"minimist": {
"version": "0.0.8",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"minipass": {
"version": "2.2.4",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"safe-buffer": "^5.1.1",
"yallist": "^3.0.0"
@ -3636,6 +3646,7 @@
"version": "0.5.1",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"minimist": "0.0.8"
}
@ -3716,7 +3727,8 @@
"number-is-nan": {
"version": "1.0.1",
"bundled": true,
"dev": true
"dev": true,
"optional": true
},
"object-assign": {
"version": "4.1.1",
@ -3728,6 +3740,7 @@
"version": "1.4.0",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"wrappy": "1"
}
@ -3849,6 +3862,7 @@
"version": "1.0.2",
"bundled": true,
"dev": true,
"optional": true,
"requires": {
"code-point-at": "^1.0.0",
"is-fullwidth-code-point": "^1.0.0",

Просмотреть файл

@ -3,8 +3,8 @@
"scripts": {
"build": "lerna bootstrap && lerna run build",
"test": "lerna run test --parallel",
"test:travis": "nyc mocha \"@(Chatdown|Ludown|LUIS|QnAMaker)*/test/*.test.suite.js\" --timeout 100000 && nyc report --reporter=text-lcov | coveralls",
"eslint:travis": "eslint --format \"node_modules/eslint-friendly-formatter\" \"./**/*.js\" \"./@(Dispatch|LUIS|LUISGen|QnAMaker)/bin/*\""
"coverage": "nyc npm test && nyc report --reporter=text-lcov | coveralls",
"eslint": "eslint --format \"node_modules/eslint-friendly-formatter\" \"./packages/**/*.js\" \"./packages/@(Dispatch|LUIS|LUISGen|QnAMaker)/bin/*\""
},
"devDependencies": {
"chai": "^4.1.2",