express-enrouten icon indicating copy to clipboard operation
express-enrouten copied to clipboard

Allow to ignore glob path

Open IcanDivideBy0 opened this issue 9 years ago • 3 comments

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

IcanDivideBy0 avatar Oct 30 '16 11:10 IcanDivideBy0

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

dsaraswati avatar Jun 09 '17 12:06 dsaraswati

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

IcanDivideBy0 avatar Jun 09 '17 14:06 IcanDivideBy0

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

dsaraswati avatar Jun 10 '17 07:06 dsaraswati