-
Notifications
You must be signed in to change notification settings - Fork 11
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
Set up Glint and TypeScript for development #460
Conversation
64267c0
to
618d074
Compare
This comment was marked as outdated.
This comment was marked as outdated.
This switches our blueprint to the TS version by editing the config and running `npx ember-cli-upgrade init` and resolving the conflicts. This should provide a good starting point for the Glint setup.
This enables Glint and adds ignore comments where needed. We can then start converting files to .gts one by one to enable type checking.
dc01bf5
to
6e3b0aa
Compare
This will be used to map components to their loose mode equivalent so Glint can typecheck loose mode templates. https://typed-ember.gitbook.io/glint/environments/ember/using-addons#using-glint-enabled-addons
6e3b0aa
to
3e73a53
Compare
@@ -28,6 +44,9 @@ | |||
"lint:hbs:fix": "ember-template-lint . --fix", | |||
"lint:js": "eslint . --cache", | |||
"lint:js:fix": "eslint . --fix", | |||
"lint:types": "glint", | |||
"prepack": "glint -d", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means we technically will already be publishing types once we add a .ts or .gts file, but I don't think that's a huge issue unless we document how to use them in apps. We consider these private until the docs are updated.
This makes testing the types easier and adventurous consumers can start using them (with the knowledge that things might break between releases).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably delete this file since it's not used, but it's part of the blueprint, and maybe Glint will support separate files in the future.
Add Glint and TypeScript (.gts and .ts) support to the addon, so we can start converting all the code. When everything is converted we can then publish the types.