Skip to content

Commit

Permalink
Merge pull request #1576 from typed-ember/NullVoxPopuli-patch-1
Browse files Browse the repository at this point in the history
Put in maintenance mode.
  • Loading branch information
wagenet committed Dec 14, 2023
2 parents cde9d08 + 0cda33b commit 1ced367
Showing 1 changed file with 147 additions and 0 deletions.
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

0 comments on commit 1ced367

Please sign in to comment.