express-enrouten
express-enrouten copied to clipboard
Allow to ignore glob path
Hi,
Is it possible to make express-enrouten ignore all .test.js files in my routes/controllers directory ?
@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.
this is not a valid solution for me ... *.test.js file are still being require'd which obviously breaks in a non test environment
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).