Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the path shorten #3

Closed
Cyrusky opened this issue May 28, 2022 · 4 comments
Closed

Make the path shorten #3

Cyrusky opened this issue May 28, 2022 · 4 comments
Labels
enhancement New feature or request

Comments

@Cyrusky
Copy link

Cyrusky commented May 28, 2022

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.

@Cyrusky
Copy link
Author

Cyrusky commented May 28, 2022

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.

@omar-dulaimi omar-dulaimi added the enhancement New feature or request label May 29, 2022
@omar-dulaimi
Copy link
Owner

omar-dulaimi commented May 29, 2022

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.

@omar-dulaimi omar-dulaimi added this to In progress in Issues Progress Tracking Jun 1, 2022
@omar-dulaimi omar-dulaimi moved this from In progress to To do in Issues Progress Tracking Jun 1, 2022
@omar-dulaimi
Copy link
Owner

Fixed in 0.1.1

Issues Progress Tracking automation moved this from To do to Done Jun 1, 2022
@Cyrusky
Copy link
Author

Cyrusky commented Jun 2, 2022

Thx. let me try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

2 participants