chore: add containerized build and readme instructions

This commit is contained in:
Randall Morey committed 2020-06-26 11:49:38 -04:00
1 parent 0ba19e8bed
commit 22fcdfc49a
3 files changed
+38 -1

No files matched your search

+12
View File
@@ -20,6 +20,7 @@ subproject, e.g. running or testing.
- [Branching](#branching)
- [Building ToC](#building-toc)
- [Building Core UI for Production](#building-core-ui-for-production)
- [Building with a Container](#building-with-a-container)
- [Committing](#committing)
- [License Checking](#license-checking)
@@ -116,6 +117,17 @@ yarn build:production:core
Assets are saved to `ui/core/dist/`.
#### Building with a Container
Optionally, you may build the UI within a container. Execute the
following command:
```bash
docker-compose run build_production
```
Assets are saved to `ui/core/dist/`.
### Committing
Instead of the default `git commit`, we prescribe a custom command that ensures
+25
View File
@@ -0,0 +1,25 @@
version: '3.8'
services:
node: &node
image: node:12
volumes:
- './:/src'
- 'icu_node_modules:/src/node_modules'
- 'icu_addon_api_node_modules:/src/addon/api/node_modules'
- 'icu_addon_auth_node_modules:/src/addon/auth/node_modules'
- 'icu_addon_rose_node_modules:/src/addon/rose/node_modules'
- 'icu_ui_core_node_modules:/src/ui/core/node_modules'
working_dir: /src
build_production:
<<: *node
entrypoint: bash
command: '-c "yarn install && yarn build:production:ui:core"'
volumes:
icu_node_modules:
icu_addon_api_node_modules:
icu_addon_auth_node_modules:
icu_addon_rose_node_modules:
icu_ui_core_node_modules:
+1 -1
View File
@@ -8,7 +8,7 @@
"ui/*"
],
"scripts": {
"build:production:core": "cd ui/core && yarn build:production",
"build:production:ui: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",