From 18741c02aad2df9aad520390555ea6190bc0e28e Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Sat, 23 Mar 2019 22:18:53 -0300 Subject: [PATCH] global build script --- .travis.yml | 4 ++-- package.json | 10 ++-------- scripts/build.sh | 12 ++++++++++++ 3 files changed, 16 insertions(+), 10 deletions(-) create mode 100755 scripts/build.sh diff --git a/.travis.yml b/.travis.yml index 00c2971..fc0c4da 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,10 @@ language: node_js -node_js: - - '11.10.1' +node_js: node script: - ./scripts/install.sh - ./scripts/test.sh + - ./scripts/build.sh notifications: email: false diff --git a/package.json b/package.json index 2bde793..e6095db 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "install": "./scripts/install.sh", "start": "cd client && npm run start", - "build": "cd client && npm run build", + "build": "./scripts/build.sh", "test": "npm run lint && scripts/test.sh", "format:js": "prettier --parser typescript --write '**/*.{js,jsx,ts,tsx}'", "format:css": "prettier-stylelint --write --quiet '**/*.{css,scss}'", @@ -30,11 +30,5 @@ "stylelint-config-css-modules": "^1.3.0", "stylelint-config-standard": "^18.2.0", "typescript": "^3.3.3333" - }, - "browserslist": [ - ">0.2%", - "not dead", - "not ie <= 11", - "not op_mini all" - ] + } } diff --git a/scripts/build.sh b/scripts/build.sh new file mode 100755 index 0000000..f220fde --- /dev/null +++ b/scripts/build.sh @@ -0,0 +1,12 @@ +#/usr/bin/env/sh +set -e + +components="server client" + +for component in $components +do + echo "Building: $component" + cd $component + npm run build + cd .. +done