LeDDGroup / typescript-transform-paths

Transforms module resolution paths using TypeScript path mapping and/or custom paths
MIT License
465 stars 22 forks source link

What about supporting easy setup CLi command? #172

Closed samchon closed 1 year ago

samchon commented 1 year ago

As typescript-transform-paths is a transformer library, it requires additional configuration on tsconfig.json (plugins).

I think it would be much convenient if typescript-transform-paths support setup CLI configuring the tsconfig.json file automatically. Also, it would be better installing ttypescript or ts-patch at the same time. Especially, when user selected ts-patch, the package.json should be configured automatically (npm run prepare command), too.

npx typescript-transform-paths setup
npx typescript-transform-paths setup --compiler ttypescript
npx typescript-transform-paths setup --compiler ts-patch

If you're okay, I'll send a PR about it.

You can experience how it works, through below commands:

npx typia setup
npx typia setup --compiler ts-patch
npx typia setup --manager yarn
npx typia setup --project tsconfig.test.json
danielpza commented 1 year ago

I think this is better left to a separate project, since the setup steps are not exclusive to typescript-transform-paths

nonara commented 1 year ago

Hi @samchon - thank you for the offer.

I agree with Daniel on this one. We will be releasing a rewrite of ts-patch soon which will have CLI commands that will effectively do what you're looking for.

The new tsp will also use better modification logic and even offer in-memory modification, which will allow users to migrate from ttypescript.