Closed Cyrusky closed 2 years ago
And combine several similar functions to one file. then we do not need to import different components in the head of the file that has loooooong name.
Hey @Cyrusky
Thanks for the great suggestion. After the implementation, here's how the imports will look:
import { PostCreateSchema, UserAggregateSchema } from '@schemas';
As you can see, all schemas will get imported using a single import statement, single line.
There will be a need for a change on your side too(I will document it in the README).
Basically, you need to add paths in your tsconfig
file like this:
{
"compilerOptions": {
"paths": {
"@schemas": ["./src/generated/joi"]
}
}
}
Would this fix your issues?
Please let me know so I could start working on it.
Fixed in 0.1.1
Thx. let me try.
Problem
The generated pathes are tooooooooo looooooong, so please shorten them.
Suggested solution
Maybe we can use a single letter to be the folder name, then give the best practice document for the definition of the folder.. just a thouths.