Skip to content

Commit

Permalink
refine README / v2 docs
Browse files Browse the repository at this point in the history
  • Loading branch information
machty committed Sep 21, 2024
1 parent 675009a commit 7c2b131
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 30 deletions.
16 changes: 14 additions & 2 deletions V2_CHANGELOG.md → GLINT_V2.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
# Changes since v2 (Volar-ized Glint)
# Glint V2 (Alpha)

## `glint` CLI binary
Glint V2 is a major refactor of Glint V1 to run atop the [Volar.js language tooling framework], which powers the language tooling for Vue and many others.

## Supported Features

At the time of writing, the only component formats supported by Glint 2 are **.gts/.gjs components**; classic two-file (.ts/.js file + .hbs) components are not yet supported (neither class Ember components or nor Glimmer components), but support for these "classic" components is coming soon.

TODO: link to roadmap here.

[Volar.js language tooling framework]: https://volarjs.dev/

## Changelog

### `glint` CLI binary

- BREAKING CHANGE: closer unification with vanilla `tsc`
- `glint` is now a much more thin wrapper around `tsc` and requires a number of changes to the arguments passed to it to accomplish typical tasks
Expand Down
34 changes: 6 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,41 +2,19 @@

TypeScript-powered tooling for Glimmer templates.

## Overview
## Glint 2 (Alpha)

[Glint] is a set of tools to aid in developing code that uses the Glimmer VM for rendering, such as [Ember.js] v3.24+. Similar to [Vetur] for Vue projects or [Svelte Language Tools], Glint consists of a CLI and a language server to provide feedback and enforce correctness both locally during editing and project-wide in CI.
This branch contains the code for Glint V2, which is currently in an **alpha** state. Glint V2 is a major refactor of Glint V1 to run atop the [Volar.js language tooling framework], which powers the language tooling for Vue and many others.

[glint]: https://typed-ember.gitbook.io/glint
[ember.js]: https://www.emberjs.com
[vetur]: https://github.com/vuejs/vetur
[svelte language tools]: https://github.com/sveltejs/language-tools
See [Glint V2](./GLINT_V2.md) for information on how to try out Glint V2.

## Getting Started
[Volar.js language tooling framework]: https://volarjs.dev/

Glint is broken into several different packages that you may use, depending on the details of your project. Typically you'll add `@glint/core`, `@glint/template` and a Glint environment package that reflects the type of project you're working on, then add a `"glint"` key to your `tsconfig.json` that tells Glint what it should look at.
## Glint 1 Docs

For more specific details on setting up Glint in your project, take a look at [the documentation], in particular the Installation pages [for Ember.js projects].
Please see [the documentation] for how to get set up with Glint V1.

[the documentation]: https://typed-ember.gitbook.io/glint
[for ember.js projects]: https://typed-ember.gitbook.io/glint/environments/ember/installation

## Using Glint

The `@glint/core` package includes two executables: `glint` and `glint-language-server`.

The `glint` CLI can be used to typecheck your project in a similar manner to `tsc`, but with understanding of how values flow through templates.

![glint being run at a terminal and producing a tsc-style type error for a template file](https://user-images.githubusercontent.com/108688/111076577-1d61db00-84ed-11eb-876a-e5b504758d11.png)

You can [use the `glint` executable in CI][using-glint] to ensure you maintain type safety in your templates. You can also use the `glint` command locally with the `--watch` flag to monitor your project as you work!

Similarly, `glint-language-server` can be used by editor integrations to expose that same information inline as you type.

![a TypeScript-style type error being shown inline for a template file](https://user-images.githubusercontent.com/108688/111076679-995c2300-84ed-11eb-934a-3a29f21be89a.png)

The language server can also enable your editor to provide other richer help, such as type information on hover, automated refactoring, and more. See [the VS Code extension README](packages/vscode) for further examples.

[using-glint]: https://typed-ember.gitbook.io/glint/getting-started#using-glint

## Debugging Glint

Expand Down

0 comments on commit 7c2b131

Please sign in to comment.