Closed zoey-kaiser closed 2 years ago
How do we add Typescript
does plop not support typescript? 😢
How do we export it as a npx package
we should be able to do this by adding an entrypoint that we reference via a bin
entry in the package.json, right?
does plop not support typescript? 😢
It does, I will attempt to integrate the compiler from sidebase-libs
and I will see if it works!
we should be able to do this by adding an entrypoint that we reference via a
bin
entry in the package.json, right?
Okay, I will also look at sidebase-libs
again and see if I can do it! I am pretty new in this stuff, so it might be wrong, but we will catch that during review :)
I attempted to introduce TypeScript and the correct exports.
However I ran into the following issues:
plop.js
in the root directory. How do I complile this as well?npm run plop
which calls plops own CLI. How do we build and export this, to make plop no longer required? I did some searching and found this: https://github.com/plopjs/plop/tree/main/packages/node-plop, However there is sadly almost no documentation about this package, making it hard to use. @BracketJohn, would you be so kind to try and integrate TS correctly? I really had some issues while attempting it. Thank you!
One helpful issue about it would be https://github.com/plopjs/plop/issues/78:
We can take two approches. Either remove plop and use their barebones package node-plop
which removes most of the bells and whistels or we can somehow try to package plop and run it behind the scenes when the user runs our command.
I also found a cli from microsoft that uses plop-node. I will use it as an example!
https://github.com/microsoft/just/tree/7b60548eaed6311b98ec9d602e118caadcc63e9b/packages/create-just
Contributes to https://github.com/sidestream-tech/sidebase/issues/59
Issues that need to be discusses:
npx package