-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
Enable cookieplone add-ons via mrs.developer in pnpm-workspace.yaml #109
Comments
@Fosten I'm not sure I understand the situation you're reporting. Could you provide steps to reproduce the problem starting from a fresh cookieplone project? |
Ah yes, sorry, I see that I left out a key detail. This is for cookieplone add-ons fetched via mrs.developer. Steps to reproduce:
This is because it clones the entire repo including the "-dev" outer package where there is already declaration for "dependencies": { "volto-addon": "workspace:*"}. In your cookieplone root project pnpm-workspace.yaml, you can add Or add a catch-all like Or simply change And then for the Dockerfile additionally copy in your pnpm-workspace.yaml (Which should be done anyway to allow future user-customization of this file). Perhaps there is a better way? Only clone the inner packages/src? Or change mrs.developer add-on path "output": "packages"? Or use hoist settings in .npmrc https://pnpm.io/npmrc ? However, the above solutions worked fine. This ticket is related to issue #108. |
@davisagli I think my issue is somewhat similar or perhaps the same and I would love your feedback. I created a new project using: I then tried to create it with: pipx run cookieplone frontend_addon When we had the yo generator you could run from the project root and get the addon created in src/addons and integrated with mrs.developer and tsconfig.json here if you use: How do we then replicate the behavior of the generator with the cookieplone templates? EDIT: EDIT 2: |
When a PR is created, let's ensure that related docs are updated in a separate PR. The relevant area is in https://6.docs.plone.org/volto/development/add-ons/index.html, which we published on Nov 5, 2024. |
The original issue here is about using mrs.developer to check out an add-on which is developed in a separate repository. @Fosten There is existing documentation in https://6.docs.plone.org/volto/development/add-ons/install-an-add-on-dev-18.html which mentions the need to update pnpm-workspace.yaml @Fosten gave 2 suggestions which make sense to me:
@ichim-david If I understood correctly, you're talking about a different scenario where you already have a project and want to create a new frontend addon in the same repository. Did I get that right? Currently the frontend_addon template supports 2 use cases:
Your use case would be nice to support as well. It sounds like we would need to:
|
These were taken care of in #112 @ichim-david I'd like to close this issue since the original issue was resolved, and create a new one for supporting your use case. |
This line works within cookieplone add-ons
cookieplone-templates/frontend_addon/{{ cookiecutter.__folder_name }}/pnpm-workspace.yaml
Line 4 in 6e8c38d
But for a project's pnpm-workspace file, this only supports generator-volto add-ons
As seen in kitconcept.volto-lite-theme
https://github.com/kitconcept/volto-light-theme/blob/18c9fba394c41fafbf303dce877ae946735823ca/pnpm-workspace.yaml#L4-L6
This supports cookieplone addons within a cookieplone project
This also worked for me.
Additionally, if the project's pnpm-workspace.yaml is customized for any reason, the user will need to add this to the frontend Dockerfile
The text was updated successfully, but these errors were encountered: