-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationpractices/patterns
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
utilsdirectory with a singleindex.tsfile (doesn't make sense to me at all) - A
modules/includes/utilsdirectory with separate files withdefaultexports
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
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentationpractices/patterns