Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typescript starter fails test #455

Open
cogoo opened this issue Feb 6, 2019 · 9 comments
Open

Typescript starter fails test #455

cogoo opened this issue Feb 6, 2019 · 9 comments

Comments

@cogoo
Copy link

cogoo commented Feb 6, 2019

Hey!

Starting a new project with TypeScript has some issues.

  • The initial tests don't pass. This is due to some inconsistencies with the initial generate command. It's looking for a model.js.ejs template, but the actual template is model.ts.ejs.

  • When you build the project, the model.ts.ejs file doesnt get compiled to a js file.

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
Copy link
Author

cogoo commented Feb 6, 2019

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

@jamonholmgren
Copy link
Member

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
Copy link
Author

cogoo commented Mar 5, 2019

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
Copy link
Member

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
Copy link
Author

cogoo commented Mar 7, 2019

That would be part one.

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

@jamonholmgren
Copy link
Member

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

@cogoo
Copy link
Author

cogoo commented Mar 23, 2019

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
Copy link
Member

Possibly related to #509.

@JeffBeltran
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants