zero
zero copied to clipboard
Feature Request: Allow to define an input folder
Current Behavior
Zero pick up files and folders in the project root folder, this is ok for small projects but can get messy for sites with many pages. Look at this:
Proposal
Allow to define an input folder where Zero will get the files, for example:
zero src
zero src/pages // or
zero ../client/pages // or
zero src docs // Multiple entry points, maybe 👀
And so the spread files can be organized into a "src" folder like that:
This also solves the confusion in .zeroignore to route only the desired files.
Backward compatibility
This new behavior can be easily integrated without breaking old projects. If no entry point is specified, it will fallback to root folder as usual.
Although not documented (I think), this should already work. Doing zero src
or zero www
or even zero build www
should work just fine. Give it a shot please and see if you find it good enough to be added to docs.
Here is how I organize zeroserver.io:

And run it with zero www
.
I searched in the docs before open this issue but did not find this information 😓. It would be relevant to show this. Wait a minute...
@iagobruno Did it work fine for your project?
Yes, much better than the other solution I used in another project.