Skip to content

Commit

Permalink
Merge pull request #716 from machty/rm-glimmerx
Browse files Browse the repository at this point in the history
Remove GlimmerX
  • Loading branch information
wagenet authored Mar 21, 2024
2 parents 49eda95 + 15874de commit ee54032
Show file tree
Hide file tree
Showing 109 changed files with 438 additions and 6,237 deletions.
4 changes: 2 additions & 2 deletions ARCHITECTURE.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ Note: The fact that the synthesized module is _not_ persisted to disk means that

**Invariants:**

- The core **template DSL** has no knowledge of semantics that are particular to a given environment (e.g. GlimmerX's functions-as-modifiers), nor of any built-in globals or keywords.[^dsl-invariants]
- The core **template DSL** has no knowledge of semantics that are particular to a given environment, nor of any built-in globals or keywords.[^dsl-invariants]
- Code emitted by the **transform** layer never directly references `@glint/template`. Rather, **environment** packages re-export the contents of `@glint/template` with tweaks or additions to the types that reflect their runtime behavior. This typically includes declaring the set of available `Globals` and defining appropriate semantics for `resolve`.

[^dsl-invariants]: It does have _definitions_ for a small number of keywords that are core to the VM, but it's still up to individual environments to expose them.
Expand Down Expand Up @@ -124,4 +124,4 @@ This relationship looks roughly like this:

[matklad]: https://matklad.github.io/2021/02/06/ARCHITECTURE.md.html

[^env]: Each environment is specific to a single context (“environment”) like Ember, GlimmerX, etc. Accordingly, they are likely to move _out_ of the Glint monorepo in the long-term, but will remain part of the Glint ecosystem and working model.
[^env]: Each environment is specific to a single context (“environment”) like Ember, etc. Accordingly, they are likely to move _out_ of the Glint monorepo in the long-term, but will remain part of the Glint ecosystem and working model.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ There are a few VSCode Launch Configurations within `./vscode/launch.json` that
- In this mode, both language servers will provide duplicate completions and suggestions, which can be useful for testing out feature parity between Glint and TS
- Debug Extension (Glint Only)
- This is useful for testing out the "takeover" mode of running Glint, where Glint is responsible for providing all of the language features (debugging, diagnostics, etc); this is the ideal way to run Glint, but at the time of writing we have not yet achieved feature parity with built-in TS
- By default these extensions will launch the VSCode Extension Host in the `test-packages` subfolder, which have Ember and Glimmerx apps that you can do some basic testing on
- By default these extensions will launch the VSCode Extension Host in the `test-packages` subfolder, which have Ember apps that you can do some basic testing on
- _TIP_: you can open any workspace with the Extension Host, meaning you can even debug the language server with breakpoints on a totally separate Ember repo, for example.
- _NOTE_: debugging takes place within the `glint` workspace, i.e. if you are debugging completions, you'd trigger a completion within the Extension Host, and the breakpoint would pause within the Glint workspace VSCode instance.

Expand Down
6 changes: 2 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,21 @@ TypeScript-powered tooling for Glimmer templates.

## Overview

[Glint] is a set of tools to aid in developing code that uses the Glimmer VM for rendering, such as [Ember.js] v3.24+ and [GlimmerX] projects. 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.
[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.

[glint]: https://typed-ember.gitbook.io/glint
[ember.js]: https://www.emberjs.com
[glimmerx]: https://github.com/glimmerjs/glimmer-experimental
[vetur]: https://github.com/vuejs/vetur
[svelte language tools]: https://github.com/sveltejs/language-tools

## Getting Started

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.

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] and [for GlimmerX projects].
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].

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

## Using Glint

Expand Down
3 changes: 1 addition & 2 deletions docs/configuration/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ Some environments may accept user-specified configuration. To pass configuration
```javascript
"glint" {
"environment": {
"ember-loose": {},
"glimmerx": {
"ember-template-imports": {
"additionalGlobals": ["my-special-template-macro"]
}
}
Expand Down
3 changes: 1 addition & 2 deletions docs/configuration/project-references.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,13 @@ Then each project within can use the `extends` key to reuse both TypeScript and

## Per-project configuration

To work with Glint, each sub-project needs to include the Glint environment imports it uses. (See [Ember: Installation][ei] and [GlimmerX: Installation][gi] for details.) For example, a project using `ember-template-imports` should have this import visible somewhere:
To work with Glint, each sub-project needs to include the Glint environment imports it uses. (See [Ember: Installation][ei] for details.) For example, a project using `ember-template-imports` should have this import visible somewhere:

```ts
import '@glint/environment-ember-template-imports';
```

[ei]: ../ember/installation.md
[gi]: ../glimmerx/installation.md

The easiest way to do this is to add it to a shared file all projects can reference using the `include` key in each sub-project's `tsconfig.json`.
If you do not already have something filling this role, you should introduce a `local-types` directory (named however you like) in the root of your project, with an `index.d.ts` in it.
Expand Down
4 changes: 0 additions & 4 deletions docs/contents.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@
* [Using Addons](ember/using-addons.md)
* [Authoring Addons](ember/authoring-addons.md)
* [Template Imports](ember/template-imports.md)
* [GlimmerX](using-glint/glimmerx/README.md)
* [Installation](glimmerx/installation.md)
* [Component Signatures](glimmerx/component-signatures.md)
* [Template Components](glimmerx/template-components.md)

## Troubleshooting
* [Migration Notes](migrating.md)
Expand Down
1 change: 0 additions & 1 deletion docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ Then, add a `"glint"` key in your `tsconfig.json` that tells Glint what environm

See the [Configuration](configuration/_index.md) page for more details about options you can specify under the `"glint"` key. For setup instructions specific to your project type, check out the links below:

- [GlimmerX Installation](glimmerx/installation.md)
- [Ember.js Installation](ember/installation.md)

## Using Glint
Expand Down
37 changes: 0 additions & 37 deletions docs/glimmerx/component-signatures.md

This file was deleted.

48 changes: 0 additions & 48 deletions docs/glimmerx/installation.md

This file was deleted.

25 changes: 0 additions & 25 deletions docs/glimmerx/template-components.md

This file was deleted.

9 changes: 0 additions & 9 deletions docs/migrating.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,20 +236,11 @@ When you've finished your migration, you can update to Glint 0.8 and remove the
`import '@glint/environment-ember-loose/native-integration';` line from your project, leaving only
`import '@glint/environment-ember-loose';`.

{% hint style="warning" %}
Note: `@glint/environment-glimmerx` currently does not support native imports and has been held back temporarily from
release for version 0.8.0. Until a new release of GlimmerX is available, please remain on Glint 0.7 for projects using
GlimmerX.
{% endhint %}

## Native Signatures and Imports

This guide provides direction for migrating from custom Glint-specific import paths and signature formats to the
native imports and standardized signatures for `@ember/component`, `@glimmer/component` and `ember-modifier`.

Note that this guide applies to `@glint/environment-ember-loose`, but `@glint/environment-glimmerx` doesn't yet support
native imports, pending an upgrade of GlimmerX's own dependencies.

### Background

Prior to version `0.7.4`, Glint required users to import the factories and base classes for components, helpers and
Expand Down
3 changes: 1 addition & 2 deletions docs/overview.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Glint is a set of tools to aid in developing code that uses the Glimmer VM for rendering, such as [Ember.js] v3.24+ and [GlimmerX] projects. 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.
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.

## Glint CLI

Expand All @@ -19,7 +19,6 @@ The Glint language server implements the standardized [Language Server Protocol]
![Suggesting component arguments in typeahead with type information and documentation](https://user-images.githubusercontent.com/108688/111070948-3f9b2f00-84d4-11eb-9eaa-077cadf6f380.png)

[ember.js]: https://www.emberjs.com
[glimmerx]: https://github.com/glimmerjs/glimmer-experimental
[vetur]: https://github.com/vuejs/vetur
[svelte language tools]: https://github.com/sveltejs/language-tools
[language server protocol]: https://microsoft.github.io/language-server-protocol/
2 changes: 0 additions & 2 deletions docs/using-glint/glimmerx/README.md

This file was deleted.

38 changes: 18 additions & 20 deletions docs/with-js.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,34 +45,32 @@ You can also use a `tsconfig.json` file with `compilerOptions.allowJs: true`.

To receive equivalent rich editor support for component JS files in your project, you will need to document your components with valid JSDoc. For example:

```javascript
// SimpleComponent.js

import Component from '@glint/environment-glimmerx/component';
import { hbs } from '@glimmerx/component';
import { helper } from '@glint/environment-glimmerx/helper';

const or = helper(
/**
* @template T
* @template U
* @param {[a: T, b: U]} param
* @returns T | U
*/
([a, b]) => a || b
);
```gjs
// SimpleComponent.gjs
import Component from '@glimmer/component';
/**
* Multiplies two numbers
* @param {number} a - The first operand
* @param {number} b - The second operand
* @returns {number} The multiplied value.
*/
const multiply = (a, b) => a * b;
/**
* @typedef SimpleComponentSignature
* @property {object} Args
* @property {string} Args.message
* @property {number} Args.num
*/
/** @extends {Component<SimpleComponentSignature>} */
export default class SimpleComponent extends Component {
static template = hbs`
<h1>This is my simple message: {{or @message 'hello'}}</h1>
`;
foo = 5
<template>
<h1>{{@num}} * {{this.foo}} = {{multiply @num this.foo}}</h1>
</template>
}
```

Expand Down
Loading

0 comments on commit ee54032

Please sign in to comment.