Closed OsirisFrik closed 4 months ago
Added flag and logic to import index file in path without recurse flag
recurse
Sometimes can use a folder to group a modules and keep clean files structures, we can't import a index file (if exists) from the path without recurse flag.
./ ┣ modules ┃ ┣ b.js ┃ ┣ c.js ┃ ┗ index.js ┣ a.js ┗ app.js
requireDir('./', { indexFile: true }) // Return { a: require('./a.js'), modules: require('./modules') }
Added flag and logic to import index file in path without
recurse
flagSometimes can use a folder to group a modules and keep clean files structures, we can't import a index file (if exists) from the path without
recurse
flag.