infinitered / gluegun

A delightful toolkit for building TypeScript-powered command-line apps.
MIT License
2.92k stars 145 forks source link

Typescript starter fails test #455

Open cogoo opened 5 years ago

cogoo commented 5 years ago

Hey!

Starting a new project with TypeScript has some issues.

How can we fix this for the JS build, as we have to reference a template file for the generate command. How do we handle the TS to JS change

cogoo commented 5 years ago

Would love to submit a PR for this if I can be pointed in the right direction

jamonholmgren commented 5 years ago

Hey @cogoo ! Apologies for how long this has taken me to respond to.

I'd love some help with this. I'm a little behind on Gluegun and working hard to catch up.

cogoo commented 5 years ago

Thats fine, your hard work already on Gluegun is appreciated.

Will try and help on this issue, do you have any insight to share that could help with this

jamonholmgren commented 5 years ago

I'd have to look into it a bit, but is it just a matter of changing the js to ts in the generator script?

cogoo commented 5 years ago

That would be part one.

Will also need the TS Compiler to compile the model.ts.ejs file to model.js.ejs

jamonholmgren commented 5 years ago

I see, yeah, that seems doable but just needs someone to take the task on.

cogoo commented 5 years ago

Looked into this, unfortunately the TS compiler doesn't accept "custom" extensions, in this case '.ejs'. An alternative could be in the npm build script, we copy the template folder into the output directory

jamonholmgren commented 5 years ago

Possibly related to #509.

JeffBeltran commented 4 years ago

Hello, just wanted to comment that im running into same issue but it looks almost like it's intermittent(i swore it worked once). Still playing around with this atm but following the guide i get the same error but only when i TS starter.