-
Notifications
You must be signed in to change notification settings - Fork 35
chore: re-enable turbo cache by pulling plasmic version info #6007
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
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.
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
There was a problem hiding this comment.
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?
|
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.
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?
There was a problem hiding this comment.
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": { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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"], |
There was a problem hiding this comment.
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?
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 😄 .