Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion apps/frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ next-env.d.ts
storybook-static

# build files for pyodide packaging
/.pyodide
/.pyodide
.plasmic-latest-info.txt
4 changes: 3 additions & 1 deletion apps/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"test:watch": "jest --watch",
"update:deps": "ncu -i",
"storybook": "storybook dev -p 3000",
"build:storybook": "storybook build"
"build:storybook": "storybook build",
"plasmic:info": "dotenv -e .env.local -- bash -c 'pnpm plasmic info -p $PLASMIC_PROJECT_ID >> .plasmic-latest-info.txt'"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@IcaroG is there a plasmic loader native way to get the current version number so that we can cache properly?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤞 hope there is cause this was a nasty hack

},
"dependencies": {
"@ai-sdk/google": "^1.2.22",
Expand Down Expand Up @@ -146,6 +147,7 @@
"@graphql-typed-document-node/core": "^3.2.0",
"@leancodepl/resolve-eslint-flat-config": "^9.6.5",
"@parcel/watcher": "^2.5.1",
"@plasmicapp/cli": "0.1.340",
"@storybook/addon-a11y": "^9.1.2",
"@storybook/addon-docs": "^9.1.2",
"@storybook/addon-onboarding": "^9.1.2",
Expand Down
33 changes: 33 additions & 0 deletions apps/frontend/plasmic.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"platform": "nextjs",
"code": {
"lang": "ts",
"scheme": "blackbox",
"reactRuntime": "classic"
},
"style": {
"scheme": "css-modules",
"defaultStyleCssFilePath": ""
},
"images": {
"scheme": "public-files",
"publicDir": "../public",
"publicUrlPrefix": "/"
},
"tokens": {
"scheme": "theo",
"tokensFilePath": "plasmic-tokens.theo.json"
},
"srcDir": "components",
"defaultPlasmicDir": "./plasmic",
"projects": [],
"globalVariants": {
"variantGroups": []
},
"wrapPagesWithGlobalContexts": true,
"nextjsConfig": {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I think this plasmic.json isn't configured correctly (e.g. we use app router, not pages router).
But we can fix this later since we're not actually doing codegen atm.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh ya this was intentionally the autogenerated plasmic.json since i assumed it wasn't needed with the way we use plasmic.

"pagesDir": "../pages"
},
"cliVersion": "0.1.340",
"$schema": "https://unpkg.com/@plasmicapp/[email protected]/dist/plasmic.schema.json"
}
3 changes: 3 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,16 @@
"cache": false
},
"test": {},
"@opensource-observer/frontend#build": {
"dependsOn": ["^build"],
"outputs": ["out/**", ".next/**", "!.next/cache/**", ".pyodide/**"],
"@opensource-observer/frontend#plasmic:info": {
"outputs": [".plasmic-latest-info.txt"],
"env": ["PLASMIC_PROJECT_ID", "PLASMIC_PROJECT_API_TOKEN"],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I should remove the API_TOKEN here

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTW, you can authenticate via environment variables with the CLI
https://github.com/plasmicapp/plasmic/blob/master/packages/cli/src/utils/auth-utils.ts#L181

@IcaroG I'm kinda forgetting now how Plasmic CLI handles the read token so that CI doesn't need to log in? Do you recall how GitHub actions authenticates for something like this?

"cache": false
},
"@opensource-observer/frontend#build": {
"dependsOn": ["^build", "@opensource-observer/frontend#plasmic:info"],
"outputs": ["out/**", ".next/**", "!.next/cache/**", ".pyodide/**"],
"env": ["PLASMIC_PROJECT_ID", "PLASMIC_PROJECT_API_TOKEN"]
},
"@opensource-observer/frontend#deploy": {
"dependsOn": ["^build"],
"outputs": ["out/**", ".next/**", "!.next/cache/**", ".pyodide/**"],
Expand Down
Loading