chore: re-enable turbo cache by pulling plasmic version info#6007
chore: re-enable turbo cache by pulling plasmic version info#6007
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
One TODO, there needs to be an update to |
| "outputs": ["out/**", ".next/**", "!.next/cache/**", ".pyodide/**"], | ||
| "@opensource-observer/frontend#plasmic:info": { | ||
| "outputs": [".plasmic-latest-info.txt"], | ||
| "env": ["PLASMIC_PROJECT_ID", "PLASMIC_PROJECT_API_TOKEN"], |
There was a problem hiding this comment.
I should remove the API_TOKEN here
There was a problem hiding this comment.
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?
|
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'" |
There was a problem hiding this comment.
@IcaroG is there a plasmic loader native way to get the current version number so that we can cache properly?
There was a problem hiding this comment.
🤞 hope there is cause this was a nasty hack
| "variantGroups": [] | ||
| }, | ||
| "wrapPagesWithGlobalContexts": true, | ||
| "nextjsConfig": { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"], |
There was a problem hiding this comment.
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?
tbh, I'm not sure this is the best solution but it does work locally. The
plasmic.jsonfile 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
previewmode and by default that value is set to false. If it's true then theplasmic:infonpm script will simple append the current timestamp or something. Unless our resident plasmic experts have a better way 😄 .