plone / volto

React-based frontend for the Plone Content Management System
https://demo.plone.org/
MIT License
448 stars 610 forks source link

Some files starting with dot are not added in a new addon created with generator-volto #5719

Closed wesleybl closed 6 months ago

wesleybl commented 7 months ago

Describe the bug Although the template has several files that start with a dot, such as .dockerignore, .editorconfig, etc., only .gitignore is added.

To Reproduce Steps to reproduce the behavior:

npm install -g @plone/generator-volto
yo @plone/volto test-volto
cd test-volto
yo @plone/volto:addon myaddon

Expected behavior All files that start with dot in the template must be in the generated addon

Software (please complete the following information):

Additional context It looks like .gitignore was added after @instification 's PR: https://github.com/plone/volto/pull/5258

instification commented 7 months ago

Hi @wesleybl

The generator doesn't automatically include dotfiles when copying the template over.

The code that copies over the dotfiles is here:

https://github.com/plone/volto/blob/4a0580a518756f0cfcbb79fed7d175e84f12453f/packages/generator-volto/generators/addon/index.js#L207-L229

So only the .github/workflows .yarn/releases and .gitignore get copied over at the moment.

I'm afraid I don't know why it doesn't just copy the whole template including ignore files, I suspect it might not be possible to do it that way and all dotfiles will need to be manually added in index.js

wesleybl commented 7 months ago

@instification previously, all files were copied. but your commit removed this:

https://github.com/plone/volto/commit/481350a1b1a301585255f73c72254cf533253c23#diff-8e0c5c3e0d39a00af7107d1566342f007ac02fafadff5f6bcc73db54fe7ad483L227

instification commented 7 months ago

@wesleybl yeah my change seems to have stopped the other dotfiles coming through.

I have made a fix in #5724 which should resolve the issue