Skip to content
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

Put in maintenance mode. #1576

Merged
merged 4 commits into from
Dec 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 147 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,150 @@
# MAINTENANCE MODE

ember-cli-typescript will no longer be updated unless necessary - ec-ts is no longer needed and all available features are configurable in userland.

See the official TypeScript docs on the ember guides website here: https://guides.emberjs.com/release/typescript/
This section of the docs has details for getting started with TypeScript, beyond what is laid out here.

With every release, we output the `--typescript` output of new ember apps to this StackBlitz: https://stackblitz.com/github/ember-cli/editor-output/tree/stackblitz-app-output-typescript

## How to use TypeScript without `ember-cli-typescript`?

Apps and v1 addons need to configure Babel to compile TypeScript files via the `ember-cli-babel` config, as described in the [ember-cli-babel](https://github.com/emberjs/ember-cli-babel#enabling-typescript-transpilation).

Additionally, you will need the `tsconfig.json` generated by the Ember TypeScript blueprint (see below for details), and then can run [`glint`](https://typed-ember.gitbook.io/glint) or `tsc` directly on the CLI. (Again, see the official docs for details!)

### Apps

```js
'ember-cli-babel': {
enableTypeScriptTransform: true,
},
```

### v1 addons

Configure this in the addon's `index.js` in the root of the project:

```js
module.exports = {
name: require('package').name,
options: {
'ember-cli-babel': {
enableTypeScriptTransform: true
}
}
}
```

### v2 addons

The [V2 Addon Blueprint](https://github.com/embroider-build/addon-blueprint) does not use nor need ember-cli-typescript, nor any of its features.

## What tsconfig.json should be used?

The official blueprints for apps and v1 addons (as of 2023-12-06) specifies:

<details><summary>for apps</summary>

```jsonc
{
"extends": "@tsconfig/ember/tsconfig.json",
"compilerOptions": {
// The combination of `baseUrl` with `paths` allows Ember's classic package
// layout, which is not resolvable with the Node resolution algorithm, to
// work with TypeScript.
"baseUrl": ".",
"paths": {
"<%= name %>/tests/*": ["tests/*"],
"<%= name %>/*": ["app/*"],
"*": ["types/*"]
}
}
}
```



</details>

<details><summary>For v1 addons</summary>

```jsonc
{
"extends": "@tsconfig/ember/tsconfig.json",
"compilerOptions": {
// The combination of `baseUrl` with `paths` allows Ember's classic package
// layout, which is not resolvable with the Node resolution algorithm, to
// work with TypeScript.
"baseUrl": ".",
"paths": {
"dummy/tests/*": ["tests/*"],
"dummy/*": ["tests/dummy/app/*", "app/*"],
"<%= addonName %>": ["addon"],
"<%= addonName %>/*": ["addon/*"],
"<%= addonName %>/test-support": ["addon-test-support"],
"<%= addonName %>/test-support/*": ["addon-test-support/*"],
"*": ["types/*"]
}
}
}
```

</details>

## What `@types/*` packages do I install?

<details><summary>if you're using ember-data</summary>

```
"@types/ember": "^4.0.8",
"@types/ember-data": "^4.4.13",
"@types/ember-data__adapter": "^4.0.4",
"@types/ember-data__model": "^4.0.3",
"@types/ember-data__serializer": "^4.0.4",
"@types/ember-data__store": "^4.0.5",
"@types/ember__application": "^4.0.9",
"@types/ember__array": "^4.0.7",
"@types/ember__component": "^4.0.19",
"@types/ember__controller": "^4.0.9",
"@types/ember__debug": "^4.0.6",
"@types/ember__destroyable": "^4.0.3",
"@types/ember__engine": "^4.0.8",
"@types/ember__error": "^4.0.4",
"@types/ember__helper": "^4.0.4",
"@types/ember__modifier": "^4.0.7",
"@types/ember__object": "^4.0.9",
"@types/ember__owner": "^4.0.7",
"@types/ember__polyfills": "^4.0.4",
"@types/ember__routing": "^4.0.17",
"@types/ember__runloop": "^4.0.7",
"@types/ember__service": "^4.0.6",
"@types/ember__string": "^3.16.3",
"@types/ember__template": "^4.0.4",
"@types/ember__test": "^4.0.4",
"@types/ember__utils": "^4.0.5",
"@types/qunit": "^2.19.7",
"@types/rsvp": "^4.0.6",
```

</details>

<details><summary>if you're not using ember-data</summary>

You can use ember's built in types, so you only need the following:

```
"@types/qunit": "^2.19.7",
"@types/rsvp": "^4.0.6",
```

Note that ember-data will eventually ship their own types, and allow _everyone_ to remove all the DT types.

</details>


-----------------------------

<center><h1>ember-cli-typescript</h1></center>

<center>Use TypeScript in your Ember 2.x and 3.x apps!</center>
Expand Down
Loading