Closed mriska closed 7 years ago
Good suggestion. The same goes for other languages as well (I'm mostly thinking about ember-cli-typescript here, which is still at a very early stage); you should be able to consume such addons from non-TS apps as well.
@kimroen What is your opinion on this? Do you want me to create a PR?
@kimroen Have you had the possibility to think about this? I would be happy to provide a PR if you think it is acceptable.
Sorry, I don't think I understand fully what the issue is. I looked around and found this rfc: https://github.com/ember-cli/rfcs/pull/89 - is that related to this, or something else?
Would you mind sketching out a more complete example to help me understand? If you think a PR would make it clear, then please make that and we can work it out there.
Thanks for looking into this 👍
I don't think it is directly related to the transpilation issue you mentioned. The problem here is that the *-addon
blueprints contain coffeescript files. Any addon using ember-cli-coffeescript
will create these files in the application but the application will not know how to compile them unless the application has ember-cli-coffeescript
installed. My proposed fix is to change the *-addon
blueprints to use javascript files instead of coffeescript files. Since these are simple one-line files it is a very simple job. I'll see if I can create a PR for it tomorrow.
All right, thanks for the clarification! If you use this addon that way and feel this would resolve your issue, then please go ahead. I'm not sure if it's doable, but if you could think of a test we could write to demonstrate the issue, then that would be very useful.
I'm creating a PR with the changes right now. I can't think of a way to write a test for this unfortunately, but I do know that the proposed solution works since I have manually changed the .coffee
files to .js
in a few addons after discovering this issue.
I discovered that components created using coffeescript in an addon can not be consumed by an application that is not set up with
ember-cli-coffeescript
. This seems to be caused by the wrapping files underapp
being generated as coffee-files which the consuming application does not know how to handle. My suggestion would be to create these proxy-files as pure javascript files so that any addons created using coffeescript can be used by all applications regardless of language preferences.What do you think @kimroen? I can create a PR for that, if you agree on the resolution.