Open
Description
Is your feature request related to a problem? Please describe.
We should have a recommended way of organizing includes/utilities in our projects. I've seen some variations of:
- A
utils
directory with a singleindex.ts
file (doesn't make sense to me at all) - A
modules
/includes
/utils
directory with separate files withdefault
exports
Describe the solution you'd like
I'd like to have a recommended way of adding utilities to a project. Personally I dislike creating a lot of folder structure with complex names, so I usually prefer a includes
/modules
directory with a file for each utility context or for each method. I also dislike having them exported as default
since the name can be easily changed wherever they're imported.
Example:
src/runtime/
├── includes/
│ ├── flatObj.ts
│ ├── formatters.ts
│ ├── getClientLocale.ts
│ ├── loaderQueue.ts
│ ├── lookup.ts
│ └── memoize.ts
Or
src/runtime/
├── modules/
│ ├── flatObj.ts
│ ├── formatters.ts
│ ├── getClientLocale.ts
│ ├── loaderQueue.ts
│ ├── lookup.ts
│ └── memoize.ts
Describe alternatives you've considered
Additional context