Skip to content

Commit

Permalink
Incoporate boxel-motion builds into CI etc
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemelia committed Mar 18, 2024
1 parent 9b7f764 commit f836a10
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build-host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ jobs:
run: pnpm build
working-directory: packages/boxel-ui/addon

- name: Build boxel-motion
run: pnpm build
working-directory: packages/boxel-motion/addon

- name: Build host
run: pnpm deploy:boxel-host build-only --verbose

Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,19 @@ jobs:
if: always()
run: pnpm run lint
working-directory: packages/boxel-ui/test-app
- name: Lint Boxel Motion
if: always()
run: pnpm run lint
working-directory: packages/boxel-motion/addon
- name: Build Boxel Motion
# To faciliate linting of projects that depend on Boxel Motion
if: always()
run: pnpm run build
working-directory: packages/boxel-motion/addon
- name: Lint Boxel Motion Test App
if: always()
run: pnpm run lint
working-directory: packages/boxel-motion/test-app
- name: Lint Host
if: always()
run: pnpm run lint
Expand Down Expand Up @@ -122,6 +135,9 @@ jobs:
- name: Build boxel-ui
run: pnpm build
working-directory: packages/boxel-ui/addon
- name: Build boxel-motion
run: pnpm build
working-directory: packages/boxel-motion/addon
- name: Build host dist/ for fastboot
run: pnpm build
env:
Expand Down Expand Up @@ -159,6 +175,9 @@ jobs:
- name: Build boxel-ui
run: pnpm build
working-directory: packages/boxel-ui/addon
- name: Build boxel-motion
run: pnpm build
working-directory: packages/boxel-motion/addon
- name: Build host dist/ for fastboot
run: pnpm build
env:
Expand Down Expand Up @@ -192,6 +211,9 @@ jobs:
- name: Build boxel-ui
run: pnpm build
working-directory: packages/boxel-ui/addon
- name: Build boxel-motion
run: pnpm build
working-directory: packages/boxel-motion/addon
- name: Build host dist/ for fastboot
run: pnpm build
env:
Expand Down Expand Up @@ -222,6 +244,9 @@ jobs:
- name: Build boxel-ui
run: pnpm build
working-directory: packages/boxel-ui/addon
- name: Build boxel-motion
run: pnpm build
working-directory: packages/boxel-ui/motion
- name: Build host dist/ for fastboot
run: pnpm build
env:
Expand Down
4 changes: 3 additions & 1 deletion QUICKSTART.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,14 @@ To build the entire repository and run the application, follow these steps:
pnpm install
```

4. Build the boxel-ui:
4. Build the boxel-ui and boxl-motion addons:

```zsh
cd ./packages/boxel-ui/addon
pnpm rebuild:icons
pnpm build
cd ../../boxel-motion/addon
pnpm build
```

5. Build the host:
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ Make sure that you have created a matrix user for the base realm, drafts realm,
In order to run the ember-cli hosted app:

1. `pnpm build` in the boxel-ui/addon workspace to build the boxel-ui addon.
2. `pnpm start` in the host/ workspace to serve the ember app. Note that this script includes the environment variable `OWN_REALM_URL=http://localhost:4201/draft/` which configures the host to point to the draft realm's cards realm by default.
3. `pnpm start:all` in the realm-server/ to serve the base realm, draft realm and published realm -- this will also allow you to switch between the app and the tests without having to restart servers)
2. `pnpm build` in the boxel-motion/addon workspace to build the boxel-motion addon.
3. `pnpm start` in the host/ workspace to serve the ember app. Note that this script includes the environment variable `OWN_REALM_URL=http://localhost:4201/draft/` which configures the host to point to the draft realm's cards realm by default.
4. `pnpm start:all` in the realm-server/ to serve the base realm, draft realm and published realm -- this will also allow you to switch between the app and the tests without having to restart servers)

The app is available at http://localhost:4200. It will serve the draft realm (configurable with OWN_REALM_URL, as mentioned above). You can open the base and draft cards workspace directly by entering http://localhost:4201/base or http://localhost:4201/draft in the browser (and additionally the published realm by entering http://localhost:4201/published).

Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,12 @@
"url": "https://github.com/cardstack/boxel"
},
"scripts": {
"build:boxel-host": "cd packages/boxel-ui/addon && pnpm build && cd ../../host && NODE_OPTIONS='--max_old_space_size=8192' pnpm build:production",
"build:boxel-host": "pnpm run build:addons && cd packages/host && NODE_OPTIONS='--max_old_space_size=8192' pnpm build:production",
"build:addons": "cd packages/boxel-ui/addon && pnpm build && cd ../../.. && cd packages/boxel-motion/addon && pnpm build && cd ../../..",
"clear-caches": "find . -name 'node_modules' -type d -prune -exec rm -rf {} \\; && rm -rf $TMPDIR/embroider",
"deploy:boxel-host": "cd packages/boxel-ui/addon && pnpm build && cd ../../host && BASE_REALM_HOSTING_DISABLED=true NODE_OPTIONS='--max_old_space_size=8192' pnpm exec ember deploy",
"deploy:boxel-host:preview-staging": "cd packages/boxel-ui/addon && pnpm build && cd ../../host && BASE_REALM_HOSTING_DISABLED=true NODE_OPTIONS='--max_old_space_size=8192' pnpm exec ember deploy s3-preview-staging --verbose",
"deploy:boxel-host:preview-production": "cd packages/boxel-ui/addon && pnpm build && cd ../../host && BASE_REALM_HOSTING_DISABLED=true NODE_OPTIONS='--max_old_space_size=8192' pnpm exec ember deploy s3-preview-production --verbose",
"deploy:boxel-host": "pnpm run build:addons && cd packages/host && BASE_REALM_HOSTING_DISABLED=true NODE_OPTIONS='--max_old_space_size=8192' pnpm exec ember deploy",
"deploy:boxel-host:preview-staging": "pnpm run build:addons && cd packages/host && BASE_REALM_HOSTING_DISABLED=true NODE_OPTIONS='--max_old_space_size=8192' pnpm exec ember deploy s3-preview-staging --verbose",
"deploy:boxel-host:preview-production": "pnpm run build:addons && cd packages/host && BASE_REALM_HOSTING_DISABLED=true NODE_OPTIONS='--max_old_space_size=8192' pnpm exec ember deploy s3-preview-production --verbose",
"lint": "pnpm run --filter './packages/**' --if-present -r lint",
"lint:fix": "pnpm run --filter './packages/**' --if-present -r lint:fix"
},
Expand Down

0 comments on commit f836a10

Please sign in to comment.