This PR adds in TypeScript support to Plop through somewhat nebulous means. Namely, we:
Do not support TypeScript files through node-plop alone and expect users to use projects like tsx loaders if they want to hand-roll Plop TypeScript support with node-plop
When Plop is loaded, we check if the user has the tsx loader enabled
If they do, we pass them through no problem
If they don't, we fork the process and pass the tsx loader to Node
Wrote proper unit tests to make sure that both ESM and CJS TypeScript projects should work with this method
This PR still needs:
[x] Community testing to validate nothing is broken
[ ] Docs
Help us test
To help us test this PR, find the following package manager you use and test it with your plopfiles (JS or TS alike):
This PR adds in TypeScript support to Plop through somewhat nebulous means. Namely, we:
node-plop
alone and expect users to use projects liketsx
loaders if they want to hand-roll Plop TypeScript support withnode-plop
tsx
loader enabledfork
the process and pass thetsx
loader to NodeThis PR still needs:
Help us test
To help us test this PR, find the following package manager you use and test it with your plopfiles (JS or TS alike):
NPM
Yarn Berry
PNPM
Usage
Then use
plop
as you normally would, but remove anytsc
pre-compile steps to test the new functionality