-
-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
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.
Left some comments about style, but I do have questions about having the whole noaddon option here. Let's talk a bit more
@@ -6,6 +6,7 @@ | |||
"email": "collective@plone.org", | |||
"github_organization": "collective", | |||
"npm_package_name": "{{ cookiecutter.addon_name }}", | |||
"noaddon": false, |
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.
Please, also add the user friendly version under __prompts__
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.
Done
@@ -38,8 +44,18 @@ def run_cmd(command: str, shell: bool, cwd: str) -> bool: | |||
return False if proc.returncode else True | |||
|
|||
|
|||
def remove(filepath): | |||
if os.path.isfile(filepath): |
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.
Use pathlib.Path
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.
Done
@@ -34,8 +34,12 @@ | |||
}, | |||
"dependencies": { | |||
"@plone/volto": "workspace:*", | |||
{% if not cookiecutter.noaddon -%} |
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.
Why not to use:
"dependencies": {
"@plone/volto": "workspace:*",
"@plone/registry": "workspace:*"{%- if not cookiecutter.noaddon -%},
"{{ cookiecutter.npm_package_name }}": "workspace:*"
{%- endif %}
},
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.
Done
@@ -1,4 +1,8 @@ | |||
{% if not cookiecutter.noaddon -%} |
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.
Why not to use:
const addons = [{%- if not cookiecutter.noaddon -%}'{{ cookiecutter.npm_package_name }}'{%- endif -%}];
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.
Done
@ericof It's needed for the generation of the image without add-on. It can be even be a hidden feature. If not, when we generate the image, there will be always the default add-on in there. |
Naming is hard :-)
I like the idea of a hidden option that would control this, let me try to
implement it
…On Fri, Apr 5, 2024, 03:52 Víctor Fernández de Alba < ***@***.***> wrote:
@ericof <https://github.com/ericof> It's needed for the generation of the
image without add-on. It can be even be a hidden feature. If not, when we
generate the image, there will be always the default add-on in there.
—
Reply to this email directly, view it on GitHub
<#8 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AACKWXWBX2O3R5KAP7YNTYLY3ZC2VAVCNFSM6AAAAABFUYMTGWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMZZGA3TQOJVHA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Let's do this in the image stage, not having a public facing way to do this. |
This is for the use case of the upcoming image. We need no addon in there to have a "clean" Volto if the image alone is run for demo purposes.