From fc63fd182c6cb54cae75bab771ca97db350d866d Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 24 Jun 2020 11:33:20 -0400 Subject: [PATCH 1/4] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20clarify=20prod?= =?UTF-8?q?uction=20build=20process=20and=20asset=20location?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 5 +++++ ui/core/README.md | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 36823bde6..80c5e1558 100644 --- a/README.md +++ b/README.md @@ -100,6 +100,11 @@ To autogenerate a ToC (table of contents) for this README, run `yarn doc:toc`. Please update the ToC whenever editing the structure of README. +### Building Core UI for Production + +See ui/core/README.md Building for Production for more information on how to +build the Core UI. + ### Committing Instead of the default `git commit`, we prescribe a custom command that ensures diff --git a/ui/core/README.md b/ui/core/README.md index 5bfdb86b4..1414b3ac0 100644 --- a/ui/core/README.md +++ b/ui/core/README.md @@ -58,12 +58,18 @@ List of available project commands. `yarn run ` * Visit your app at [http://localhost:4200](http://localhost:4200). * Visit your tests at [http://localhost:4200/tests](http://localhost:4200/tests). -### Building +### Building for Production -To build the project, without running it, execute one of the following commands: +Before executing a build, be sure to set any environment variables necessary +for your target environment (see next section). To build this UI for +production, run the following commads from this folder: -* `yarn run build` (development) -* `yarn run build:production` (production) +```bash +yarn install +yarn build:production +``` + +The static production assets are saved into the `dist/` folder. #### Environment Variables From 4ddf4dc469dc6da93eaf83862018a6305eeba412 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 24 Jun 2020 11:43:19 -0400 Subject: [PATCH 2/4] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20regenerate=20t?= =?UTF-8?q?oc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/core/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/core/README.md b/ui/core/README.md index 1414b3ac0..9fe164967 100644 --- a/ui/core/README.md +++ b/ui/core/README.md @@ -10,7 +10,7 @@ The core UI for Project Watchtower. - [Installation](#installation) - [Yarn Commands](#yarn-commands) - [Running / Development](#running--development) - - [Building](#building) + - [Building for Production](#building-for-production) - [Environment Variables](#environment-variables) - [Running Tests](#running-tests) - [Deploying](#deploying) From ba62caa88fa8ad0a5fc92a204710f9180e23638b Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 24 Jun 2020 11:44:21 -0400 Subject: [PATCH 3/4] =?UTF-8?q?docs:=20=E2=9C=8F=EF=B8=8F=20regenerate=20m?= =?UTF-8?q?onorepo=20toc?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 80c5e1558..2bfd048f8 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ subproject, e.g. running or testing. - [Contributing](#contributing) - [Branching](#branching) - [Building ToC](#building-toc) + - [Building Core UI for Production](#building-core-ui-for-production) - [Committing](#committing) - [License Checking](#license-checking) From ae25ed56af8d4d1d9695226d6bfc5e27e430a77a Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Wed, 24 Jun 2020 12:07:29 -0400 Subject: [PATCH 4/4] =?UTF-8?q?chore:=20=F0=9F=A4=96=20add=20convenience?= =?UTF-8?q?=20build=20command=20at=20monorepo=20level?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 12 +++++++++++- package.json | 1 + 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2bfd048f8..4c200c5e6 100644 --- a/README.md +++ b/README.md @@ -104,7 +104,17 @@ of README. ### Building Core UI for Production See ui/core/README.md Building for Production for more information on how to -build the Core UI. +build the Core UI. Be sure to set build-related environment variables as +necessary for your target environment, as described in the Core UI readme. + +To quickly produce a production build of Core UI, run from this folder: + +```bash +yarn install +yarn build:production:core +``` + +Assets are saved to `ui/core/dist/`. ### Committing diff --git a/package.json b/package.json index f121c3503..17d23d120 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "ui/*" ], "scripts": { + "build:production:core": "cd ui/core && yarn build:production", "lint": "yarn lint:addons:api && yarn lint:addons:auth && yarn lint:addons:rose && yarn lint:ui:core", "lint:addons:api": "echo \"\n\nlint: addons/api\n\" && cd addons/api && yarn lint", "lint:addons:auth": "echo \"\n\nlint: addons/auth\n\" && cd addons/auth && yarn lint",