Fix environment-specific builds.

This commit is contained in:
Jonathan Bernard 2020-02-09 03:40:49 -06:00
parent c28eb7b240
commit 8ac1cdf476
6 changed files with 10 additions and 10 deletions

6
.gitignore vendored
View File

@ -26,3 +26,9 @@ yarn-error.log*
*.njsproj
*.sln
*.sw?
# Terrform files
.terraform/
# API Testing Files
api/temp/

View File

@ -1,5 +1,5 @@
VERSION:=$(shell git describe --always)
TARGET_ENV=dev
TARGET_ENV ?= dev
build: dist/personal-measure-api.tar.gz dist/personal-measure-web.tar.gz

View File

@ -1,3 +1,4 @@
NODE_ENV=production
VUE_APP_PM_API_BASE=https://pmapi-dev.jdb-labs.com/api
VUE_APP_LOG_LEVEL=INFO
VUE_APP_API_LOG_LEVEL=ERROR

View File

@ -1 +0,0 @@
.env.production

View File

@ -1,11 +1,5 @@
build:
pwd; \
. .env.${TARGET_ENV}; \
echo "Using API URL: ${VUE_APP_PM_API_BASE}"; \
npm run build
npm run build-${TARGET_ENV}
serve:
VUE_APP_PM_API_BASE=/api \
VUE_APP_API_LOG_LEVEL=WARN \
VUE_APP_LOG_LEVEL=TRACE \
npm run serve

View File

@ -4,7 +4,7 @@
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build --mode production",
"build-prod": "vue-cli-service build --mode production",
"build-dev": "vue-cli-service build --mode development",
"lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit"