Closed johnnyreilly closed 1 week ago
That's correct, it doesn't create the bin/
file. The contents of that file are up to you based on how you'd like to structure your API. This would be a good thing to mention in the docs!
Awesome - I'll try and add that soon. Follow up question:
I've now scaffolded out my second CLI app borrowing heavily from CTAs bin internals (you can see it here: https://github.com/johnnyreilly/ado-npm-auth-lite) and I've found all the bin stuff really handy!
Is there a desire that bin
mode could include this code deliberately, rather than the copy / pasta that I've been doing?
I think it'd be best to not 😞. Having a standard unified set would be really nice. But this is edging into enforcing opinions on how folks structure their apps. Decisions like "export a bin
from src/bin/index.ts
" is a pretty specific thing.
Bug Report Checklist
main
branch of the repository.Overview
I write CLI tools with TypeScript. I've started trying to use CTA for this and realised that either the
bin
functionality doesn't create all thesrc/bin
code that CTA itself has built in. I'm assuming this is deliberate?Either way, I'm just about to (for the second time) copy paste
src/bin
code into a project I'm starting as it's so gosh darn useful!Does CTA create this stuff if you just do it the right way? I can see a
--bin
option here:https://github.com/JoshuaKGoldberg/create-typescript-app/blob/main/docs/Options.md#optional-options
But it doesn't appear to do anything more than
package.json
fiddling. Am I getting this right?Additional Info
-