-
Notifications
You must be signed in to change notification settings - Fork 96
Closed
Labels
Description
Hey guys, I was surprised to see ember-cli-typescript encourages folks to publish Typescript.
My expectation was:
- published
.d.tsand.jsfiles, but not.tsfiles
What i see:
- published '.d.ts' and '.ts'
Why is I believe this a problem:
- I believe, but do correct me if I am wrong, but publishing the TS itself isn't the TS recommendation
- publishing TS, and having the consuming app process creates both a build time and dependency liability penalty on the consuming app.
- for example,
@ember/stringtoday cannot simply install@ember/test-helperswithout crashing due to unexpected TS syntax, without updating/fixing its own dependencies. - for example, functioning apps now have excessive dependencies which could be "precompiled" away.
My current thoughts on solving (early, but evolving, would love input):
Publish only .js + .d.ts, and have all TS related build dependencies as dev dependencies.
Local add-on development, including linking, would be handled as:
tsc -p tsconfig.json --noEmitis used for linting by editor +yarn lint- the ember build pipeline would simply strip
tsvia@babel/preset-typescript(maybe under the hood via https://github.com/stefanpenner/broccoli-babel-preset-typescript) - prepublish would produce: (1) babel stripped
.jsfiles (2) typescript producedd.tsfiles .npmignoreand.gitignorewould be use to ensure only the right files are published and committed.
Reactions are currently unavailable