zero icon indicating copy to clipboard operation
zero copied to clipboard

Feature Request: Allow to define an input folder

Open iagobruno opened this issue 5 years ago • 4 comments

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:

image

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:

image

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.

iagobruno avatar Dec 06 '19 23:12 iagobruno

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:

Screen Shot 2019-12-07 at 9 28 52 AM

And run it with zero www.

asadm avatar Dec 07 '19 04:12 asadm

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 avatar Dec 07 '19 05:12 iagobruno

@iagobruno Did it work fine for your project?

asadm avatar Dec 07 '19 06:12 asadm

Yes, much better than the other solution I used in another project.

iagobruno avatar Dec 07 '19 06:12 iagobruno