GiovanniCardamone / fastify-autoroutes

fastest way to map directories to URLs in fastify
https://giovannicardamone.github.io/fastify-autoroutes/
MIT License
85 stars 12 forks source link

Ignore underscore and dots #192

Closed Tronikelis closed 2 years ago

Tronikelis commented 2 years ago

As per docs, currently it was only ignoring files with a dot at the start. Now it will also ignore underscores.

Also, the docs say that it will ignore files within a folder that has an underscore or a dot. This behavior kinda works, only 1 level deep.

firefox_7tXcMc6Na4

See the screenshot, "_ignored" folder, first child "index.ts" gets ignored, but once we go 2 levels deep, it doesn't get ignored. I'm not sure if it is possible to write a glob that recursively goes up and checks for underscores

GiovanniCardamone commented 2 years ago

Oh you right!

I didn't test for nested directory

Thanks for the PR. I'll merge