Possibility to define a whitelist of files and folders to be routed
iagobruno opened this issue · comments
For example, consider this project structure:
- components
- ...
- pages
- index.js
- api
- middlewares
- verifyJWT.js
- users
- create.js
- middlewares
And dev could tell to zero which folders he wants to be routed using arguments:
$ zero pages api
Interesting to remember that the .zeroignore file should still work to ignore files within the whitelist, for exemplo to ignore folder "middlewares" inside "api".
Missed this!
So one possible workaround is to use the existing .zeroignore
file in the following way:
# Ignore everything
*
# But descend into directories
!*/
# Recursively allow files under a folder
!/pages/**
!/api/**
# But also ignore a sub-sub folder
/api/middlewares/**
Does this solve the issue for your use case? Having a separate whitelist feature may get confusing.