Skip to content

Conversation

@ravenac95
Copy link
Member

tbh, I'm not sure this is the best solution but it does work locally. The plasmic.json file isn't really used in the way it's intended but the plasmic cli needed it. I just wanted something so I could quickly rebuild via the cache.

This doesn't handle preview mode though. So perhaps we can use a environment variable in that can override the preview mode and by default that value is set to false. If it's true then the plasmic:info npm script will simple append the current timestamp or something. Unless our resident plasmic experts have a better way 😄 .

@vercel
Copy link

vercel bot commented Jan 5, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
kariba-network Ready Ready Preview, Comment Jan 5, 2026 9:18am
oso-www Ready Ready Preview, Comment Jan 5, 2026 9:18am

@ravenac95 ravenac95 changed the title chore: re-enable turbo cache by pull plasmic version info chore: re-enable turbo cache by pulling plasmic version info Jan 5, 2026
@ravenac95
Copy link
Member Author

One TODO, there needs to be an update to ci-default that actually logs in to plasmic assuming we use my technique.

"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?

@ravenac95
Copy link
Member Author

ravenac95 commented Jan 5, 2026

I also need instructions on doing plasmic login and such for local use

"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

"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.

"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

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants