Skip to content

Commit 9dbc416

Browse files
karimiclaude
andauthored
Reapply webapp refactor with latest data (#155)
Re-applies #153 (reverted by #154) on top of current master, but places the latest generated api_info.json / api_examples.json / proj_info.json at webapp/src/ so the deployed build has data (fixes 'Failed to load API data'). Built cleanly off current master instead of reverting #154, which conflicts because the docify bot (b400a1c) modified the data files after the revert. Follow-up: update the docify generation workflow to target docify/webapp/src. Claude-Session: https://claude.ai/code/session_012Qrsj2mgcneyw2XNJwpLtV Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent b400a1c commit 9dbc416

108 files changed

Lines changed: 5703 additions & 126823 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/deploy.yaml

Lines changed: 31 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,35 +2,41 @@ name: Heroku build and deploy
22

33
on:
44
push:
5-
branches: [ 'master' ]
6-
pull_request:
7-
branches: [ 'master' ]
5+
branches: ['master']
86
workflow_dispatch:
9-
branches:
10-
- master
117

128
jobs:
139
build_deploy:
1410
runs-on: ubuntu-latest
1511
steps:
16-
- uses: actions/checkout@v3
17-
- name: build
18-
run: |
19-
cd quasar_site/
20-
yarn
21-
yarn ssrbuild
22-
- name: deploy
23-
run: |
24-
cd quasar_site/dist/ssr/
25-
git init
26-
git config user.email "morteza@mcneel.com"
27-
git config user.name "Morteza Karimi"
28-
git remote add heroku https://heroku:${{ secrets.HEROKU_API_KEY }}@git.heroku.com/mcneel-apidocs.git
29-
git add .
30-
git commit -m "CI build"
31-
git push heroku master --force
32-
33-
- name: invalidate cache
34-
run: |
35-
curl --location 'https://api.mcneel.com/cloudfront/invalidate' --header 'Authorization: Basic ${{ secrets.BOZO_API_KEY }}' --header 'Content-Type: application/json' --data '{"url":"https://developer.rhino3d.com/api/*"}'
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: 20
16+
- name: build
17+
run: |
18+
cd webapp/
19+
yarn
20+
yarn build
21+
- name: stage static deploy artifact
22+
run: |
23+
cd webapp/
24+
rm -rf deploy && mkdir deploy
25+
cp -r dist deploy/dist
26+
cp server.js deploy/server.js
27+
cp Procfile deploy/Procfile
28+
cp deploy.package.json deploy/package.json
29+
- name: deploy to heroku
30+
run: |
31+
cd webapp/deploy/
32+
git init
33+
git config user.email "morteza@mcneel.com"
34+
git config user.name "Morteza Karimi"
35+
git remote add heroku https://heroku:${{ secrets.HEROKU_API_KEY }}@git.heroku.com/mcneel-apidocs.git
36+
git add .
37+
git commit -m "CI build"
38+
git push heroku HEAD:master --force
3639
40+
- name: invalidate cache
41+
run: |
42+
curl --location 'https://api.mcneel.com/cloudfront/invalidate' --header 'Authorization: Basic ${{ secrets.BOZO_API_KEY }}' --header 'Content-Type: application/json' --data '{"url":"https://developer.rhino3d.com/api/*"}'

.vscode/tasks.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"init",
2525
"RhinoCommon",
2626
"--force",
27-
"--target=${workspaceFolder}/quasar_site/src",
27+
"--target=${workspaceFolder}/webapp/src",
2828
"--source=${input:rhinoSource}/src4/DotNetSDK/rhinocommon/dotnet",
2929
"--examples=${input:rhinoSource}/src4/DotNetSDK/rhinocommon"
3030
],
@@ -48,21 +48,21 @@
4848
"problemMatcher": []
4949
},
5050
{
51-
"label": "run quasar",
52-
"command": "quasar",
51+
"label": "run webapp",
52+
"command": "yarn",
5353
"type": "process",
5454
"args": ["dev"],
5555
"options": {
56-
"cwd": "${workspaceFolder}/quasar_site"
56+
"cwd": "${workspaceFolder}/webapp"
5757
},
5858
"problemMatcher": "$msCompile"
5959
},
6060
{
61-
"label": "initial setup (npm)",
61+
"label": "initial setup",
6262
"type": "shell",
63-
"command": "npm install && npm run lint",
63+
"command": "yarn",
6464
"options": {
65-
"cwd": "${workspaceFolder}/quasar_site"
65+
"cwd": "${workspaceFolder}/webapp"
6666
},
6767
"problemMatcher": []
6868
}

README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ Project for generating Rhino/Grasshopper API documentation. This repo is split i
33

44
# src
55
src contains a Visual Studio project (api_docify) that parses source code and generates markdown and json files that represent the public facing API for a project
6-
# quasar_site
7-
a quasar project that creates a web site based on the json files created. This site currently gets published to heroku and can be viewed at
6+
# webapp
7+
a Vue 3 + Vite + Tailwind + Pinia SPA that creates a web site based on the json files created. This site currently gets published to heroku and can be viewed at
88

99
https://mcneel-apidocs.herokuapp.com/api/rhinocommon/
1010

11-
Instructions for building and testing the quasar site can be found at
12-
[quasar site readme](quasar_site/readme.md)
11+
Instructions for building and testing the web app can be found at
12+
[web app readme](webapp/README.md)
1313

1414

1515
## Usage
@@ -22,17 +22,16 @@ $ api_docify --name=<proj_name> <proj_path> <proj_output_js> <examples_path> <ex
2222
**Example**
2323

2424
```shell
25-
$ api_docify.exe --name="RhinoCommon" "%RHINO4SRC%/rhinocommon/dotnet" "src/modules/docify/quasar_site/src/RhinoCommonApi.js"
25+
$ api_docify.exe --name="RhinoCommon" "%RHINO4SRC%/rhinocommon/dotnet" "src/modules/docify/webapp/src/RhinoCommonApi.js"
2626
```
2727

2828
# VS Code (Mac) setup instructions
2929

30-
1. Ensure node, npm, and quasar are installed
30+
1. Ensure node and yarn are installed
3131
2. Open this folder in VS Code
32-
3. Run `CMD+Shift+P > Run Task > initial setup (npm)`
33-
4. Run `CMD+Shift+P > Run Task > docify init`, then enter the path where the Rhino source code is located and press enter.
34-
5. Run `CMD+Shift+P > Run Task > docify build`
35-
5. Run `CMD+Shift+P > Run Task > run quasar`
32+
3. Run `cd webapp && yarn` to install dependencies
33+
4. Run `CMD+Shift+P > Run Task > docify build` (or run the generator) to produce the JSON
34+
5. Run `cd webapp && yarn dev` to start the site
3635

3736
## Troubleshooting
3837

quasar_site/.eslintignore

Lines changed: 0 additions & 8 deletions
This file was deleted.

quasar_site/.eslintrc.js

Lines changed: 0 additions & 67 deletions
This file was deleted.

quasar_site/.gitignore

Lines changed: 0 additions & 33 deletions
This file was deleted.

quasar_site/.postcssrc.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

quasar_site/README.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

quasar_site/babel.config.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

quasar_site/jsconfig.json

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)