diff --git a/frontend/package.json b/frontend/package.json index 2cc61f1d17..ea0daace77 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -14,10 +14,12 @@ "dist:main": "clojure -Adev tools.clj dist main", "dist:view": "clojure -Adev tools.clj dist view", "dist:worker": "clojure -Adev tools.clj dist worker", + "dist:all": "clojure -Adev tools.clj dist-all", "dist:assets": "NODE_ENV=production gulp dist", "build:main": "clojure -Adev tools.clj build main", "build:view": "clojure -Adev tools.clj build view", "build:worker": "clojure -Adev tools.clj build worker", + "build:all": "clojure -Adev tools.clj build-all", "build:assets": "gulp dist", "start": "npm run figwheel", "build:test": "clojure -Adev tools.clj build-tests", diff --git a/frontend/scripts/build-and-run-tests.sh b/frontend/scripts/build-and-run-tests.sh index 66e6ddff05..d5a73ad8fa 100755 --- a/frontend/scripts/build-and-run-tests.sh +++ b/frontend/scripts/build-and-run-tests.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash source ~/.bashrc -npm install +npm ci npm run build:test || exit 1; node ./target/tests/main diff --git a/frontend/scripts/build-develop.sh b/frontend/scripts/build-develop.sh index a4a4f0e14b..942fdb5b71 100755 --- a/frontend/scripts/build-develop.sh +++ b/frontend/scripts/build-develop.sh @@ -1,10 +1,11 @@ #!/usr/bin/env bash source ~/.bashrc -npm install +npm ci npm run dist:clean || exit 1; npm run build:assets || exit 1; -npm run build:main || exit 1; -npm run build:view || exit 1; -npm run build:worker || exit 1; +npm run build:all || exit 1; +# npm run build:main || exit 1; +# npm run build:view || exit 1; +# npm run build:worker || exit 1; diff --git a/frontend/scripts/build-release.sh b/frontend/scripts/build-release.sh index b0a4c6e8c7..793a944470 100755 --- a/frontend/scripts/build-release.sh +++ b/frontend/scripts/build-release.sh @@ -1,10 +1,11 @@ #!/usr/bin/env bash source ~/.bashrc -npm install +npm ci npm run dist:clean || exit 1; npm run dist:assets || exit 1; -npm run dist:main || exit 1; -npm run dist:view || exit 1; -npm run dist:worker || exit 1; +npm run dist:all || exit 1; +# npm run dist:main || exit 1; +# npm run dist:view || exit 1; +# npm run dist:worker || exit 1; diff --git a/frontend/tools.clj b/frontend/tools.clj index 42df0dd3e1..f5c5fd75c6 100644 --- a/frontend/tools.clj +++ b/frontend/tools.clj @@ -110,6 +110,18 @@ build (:worker figwheel-builds)))) +(defmethod task "build-all" + [args] + (task ["build" "main"]) + (task ["build" "view"]) + (task ["build" "worker"])) + +(defmethod task "dist-all" + [args] + (task ["dist" "main"]) + (task ["dist" "view"]) + (task ["dist" "worker"])) + ;;; Build script entrypoint. This should be the last expression. (task *command-line-args*) diff --git a/manage.sh b/manage.sh index ceacf94b29..a80abbb9f9 100755 --- a/manage.sh +++ b/manage.sh @@ -134,7 +134,7 @@ function build-backend-local { rm -rf ./backend/dist - rsync -avr \ + rsync -ar \ --exclude="/test" \ --exclude="/resources/public/media" \ --exclude="/target" \ @@ -193,7 +193,7 @@ function run-develop { build-develop-frontend-image fi - echo "Running production images..." + echo "Running develop images..." sudo docker-compose -p uxbox-develop -f ./docker/docker-compose-develop.yml up -d }