refactor(aio): drop `run` (from `yarn run`), rename script and remove unnecessary cmds

This commit is contained in:
Georgios Kalpakas 2017-05-12 11:15:08 +03:00 committed by Igor Minar
parent 3065fc6cca
commit 21d213dfc7
6 changed files with 16 additions and 22 deletions

View File

@ -6,18 +6,18 @@
"author": "Angular", "author": "Angular",
"license": "MIT", "license": "MIT",
"scripts": { "scripts": {
"prebuild": "yarn run clean", "prebuild": "yarn clean-dist",
"build": "tsc", "build": "tsc",
"build-watch": "yarn run tsc -- --watch", "build-watch": "yarn tsc -- --watch",
"clean": "node --eval \"require('shelljs').rm('-rf', 'dist')\"", "clean-dist": "node --eval \"require('shelljs').rm('-rf', 'dist')\"",
"dev": "concurrently --kill-others --raw --success first \"yarn run build-watch\" \"yarn run test-watch\"", "dev": "concurrently --kill-others --raw --success first \"yarn build-watch\" \"yarn test-watch\"",
"lint": "tslint --project tsconfig.json", "lint": "tslint --project tsconfig.json",
"pre~~test-only": "yarn run lint", "pre~~test-only": "yarn lint",
"~~test-only": "node dist/test", "~~test-only": "node dist/test",
"pretest": "yarn run build", "pretest": "yarn build",
"test": "yarn run ~~test-only", "test": "yarn ~~test-only",
"pretest-watch": "yarn run build", "pretest-watch": "yarn build",
"test-watch": "nodemon --exec \"yarn run ~~test-only\" --watch dist" "test-watch": "nodemon --exec \"yarn ~~test-only\" --watch dist"
}, },
"dependencies": { "dependencies": {
"express": "^4.14.1", "express": "^4.14.1",

View File

@ -8,7 +8,7 @@ This is an overview of the available scripts and commands.
The scripts are located inside `<aio-builds-setup-dir>/scripts/`. The following scripts are The scripts are located inside `<aio-builds-setup-dir>/scripts/`. The following scripts are
available: available:
- `build.sh`: - `create-image.sh`:
Can be used for creating a preconfigured docker image. Can be used for creating a preconfigured docker image.
See [here](vm-setup--create-docker-image.md) for more info. See [here](vm-setup--create-docker-image.md) for more info.
@ -18,9 +18,9 @@ available:
- `travis-preverify-pr.sh` - `travis-preverify-pr.sh`
Can be used for "preverifying" a PR before uploading the artifacts to the server. It checks that Can be used for "preverifying" a PR before uploading the artifacts to the server. It checks that
the author of the PR a member of one of the specified GitHub teams and therefore allowed to upload the author of the PR is a member of one of the specified GitHub teams and therefore allowed to
build artifacts. This is useful for CI integration. See [here](misc--integrate-with-ci.md) for upload build artifacts. This is useful for CI integration. See [here](misc--integrate-with-ci.md)
more info. for more info.
## Commands ## Commands

View File

@ -2,15 +2,9 @@
set -eux -o pipefail set -eux -o pipefail
# Set up env # Set up env
source "`dirname $0`/env.sh" source "`dirname $0`/_env.sh"
readonly defaultImageNameAndTag="aio-builds:latest" readonly defaultImageNameAndTag="aio-builds:latest"
# Build `scripts-js/`
cd "$SCRIPTS_JS_DIR"
yarn install
yarn run build
cd -
# Create docker image # Create docker image
readonly nameAndOptionalTag=${1:-$defaultImageNameAndTag} readonly nameAndOptionalTag=${1:-$defaultImageNameAndTag}
sudo docker build --tag $nameAndOptionalTag ${@:2} $DOCKERBUILD_DIR sudo docker build --tag $nameAndOptionalTag ${@:2} $DOCKERBUILD_DIR

View File

@ -2,7 +2,7 @@
set -eux -o pipefail set -eux -o pipefail
# Set up env # Set up env
source "`dirname $0`/env.sh" source "`dirname $0`/_env.sh"
# Test `scripts-js/` # Test `scripts-js/`
cd "$SCRIPTS_JS_DIR" cd "$SCRIPTS_JS_DIR"

View File

@ -2,7 +2,7 @@
set -eux -o pipefail set -eux -o pipefail
# Set up env # Set up env
source "`dirname $0`/env.sh" source "`dirname $0`/_env.sh"
# Build `scripts-js/` # Build `scripts-js/`
cd "$SCRIPTS_JS_DIR" cd "$SCRIPTS_JS_DIR"