Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to define a whitelist of files and folders to be routed #64

Closed
iagobruno opened this issue Jul 13, 2019 · 1 comment
Closed

Comments

@iagobruno
Copy link

For example, consider this project structure:

  • components
    • ...
  • pages
    • index.js
  • api
    • middlewares
      • verifyJWT.js
    • users
      • create.js

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".

@asadm
Copy link
Contributor

asadm commented Jul 17, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants