Closed ijlee2 closed 1 year ago
@chriskrycho When ember-cli-typescript
is installed in a v1
addon, two scripts get added to package.json
:
{
"scripts": {
"prepack": "ember ts:precompile",
"postpack": "ember ts:clean"
}
}
When we use enableTypeScriptTransform
and uninstall ember-cli-typescript
, is it okay to remove these two scripts (i.e. the addon and its types will be published without an issue)?
If so, I wonder if this is worth mentioning in ember-cli-babel
's README
. I can also see the perspective that it may fit better in a migration guide in the ember-cli-typescript
repo.
Nope, nothing will generate types out of the box for you in that mode. For that reason, addons which want to publish types should generally do one of two things:
ember-cli-typescript
.Probably worth documenting that explicitly here (feel free to steal that prose and tweak/improve it!).
Thanks for writing this up, it helped me when I was having build problems with an addon. I think it would be great to have merged so it’s easier to find 😀
@bertdeblock Could we merge this pull request some time soon? (I forget where we had left off, if there had been additional feedback that I needed to address.)
Description
Currently, the
README
explains how to setenableTypeScriptTransform
for Ember apps only.It wasn't clear to me what to do for Ember addons and engines (to be precise, engines created as an addon). The setup for engines turned out to be tricky, because I wasn't supposed to embed the
'ember-cli-babel'
key inside of anoptions
hash (the pattern suggested by apps and addons).I'd like to update the section
Enabling TypeScript Transpilation
so that:v4.9.0-beta.0
at the time of writing). (Note, I continued to writereturn app.toTree();
. That is, to limit the scope of this pull request, I didn't assume that the developer uses, or will use, Embroider.)