Skip to content
This repository has been archived by the owner on Jan 25, 2020. It is now read-only.

Allow to ignore glob path #91

Open
IcanDivideBy0 opened this issue Oct 30, 2016 · 3 comments
Open

Allow to ignore glob path #91

IcanDivideBy0 opened this issue Oct 30, 2016 · 3 comments

Comments

@IcanDivideBy0
Copy link

IcanDivideBy0 commented Oct 30, 2016

Hi,
Is it possible to make express-enrouten ignore all .test.js files in my routes/controllers directory ?

@dsaraswati
Copy link

@IcanDivideBy0
Reference: /lib/directory.js:61
If you don't export a function i.e.
module.exports = Function
from your file, no route will be generated against it. Its basically skipped.
Not a perfect solution in my view, but a way to make it work for you.

@IcanDivideBy0
Copy link
Author

this is not a valid solution for me ... *.test.js file are still being require'd which obviously breaks in a non test environment

@dsaraswati
Copy link

dsaraswati commented Jun 10, 2017

In that case, I don't think enrouten has that feature.
It should be an improvement, and I would love to escape by extensions (even better if it supports regex).

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

No branches or pull requests

2 participants