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

Ship replacement typed blueprint files for core blueprints #8

Open
seawatts opened this issue Aug 23, 2017 · 6 comments
Open

Ship replacement typed blueprint files for core blueprints #8

seawatts opened this issue Aug 23, 2017 · 6 comments

Comments

@seawatts
Copy link
Contributor

No description provided.

@davewasmer
Copy link
Contributor

I don't think we need to actually override any blueprints, just expand what we are currently doing on post install to make sure we:

  1. Convert dummy app files to .ts
  2. Add a tsconfig.json to dummy app
  3. Add denali-typescript to dummy app package

@seawatts
Copy link
Contributor Author

I guess what I meant is when we do denali generate migration foo-bar it still produces a .js file and then I have to go manually convert it.

@davewasmer
Copy link
Contributor

Ah. To fix that, denali-typescript would need to ship with all the blueprints Denali core does. That's certainly doable, and unfortunately I don't see a more efficient way of doing it.

We also need to think through precedence here. If both denali and denali-typescript ship with an action blueprint, for example, and I type denali g action, which should run? Right now you can always prefix the addon name to be explicit, i.e. denali g denali-typescript:action, but I'm wondering what the default behavior should be (not sure what it is right now).

@seawatts
Copy link
Contributor Author

Hmm, good point. What if denali cli had some sort of events that fire through the lifecycle of calling a blueprint that typescript could hook into?
i.e.

afterBlueprint()?
Then in there denali-typescript could just go through and run .js -> .ts on all the files again.

@davewasmer
Copy link
Contributor

That might work for some use cases, but I think the ideal solution for denali-typescript users would be if the generated blueprints weren't just JS files with the TS extension, but were actually typed Typescript code.

Another way to think of this: how would denali-coffeescript work, since unlike Typescript, regular JS isn't valid Coffeescript?

@seawatts
Copy link
Contributor Author

seawatts commented Aug 28, 2017 via email

@davewasmer davewasmer changed the title Would be nice to override all default blueprints to create .ts files Ship replacement typed blueprint files for core blueprints Sep 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants