Skip to content

Commit 6c6a7a3

Browse files
Update README.md
1 parent cde9d08 commit 6c6a7a3

File tree

1 file changed

+139
-0
lines changed

1 file changed

+139
-0
lines changed

README.md

+139
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,142 @@
1+
# MAINTENANCE MODE
2+
3+
ember-cli-typescript will no logner be updated unless necesary - ec-ts is no longer needed and all available features are configurable in userland.
4+
5+
See the official TypeScript docs on the ember guides website here: https://guides.emberjs.com/release/typescript/
6+
This section of the docs has details for getting started with TypeScript, beyond what is laid out here.
7+
8+
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
9+
10+
## How to use TypeScript without `ember-cli-typescript`?
11+
12+
In the [ember-cli-babel](https://github.com/emberjs/ember-cli-babel#enabling-typescript-transpilation) docs, it mention that in your `ember-cli-build.js`, you can specify:
13+
```js
14+
'ember-cli-babel': {
15+
enableTypeScriptTransform: true,
16+
},
17+
```
18+
19+
For v1 addons, this would be specified in the node-land `index.js`:
20+
```js
21+
module.exports = {
22+
name: require('package').name,
23+
options: {
24+
'ember-cli-babel': {
25+
enableTypeScriptTransform: true
26+
}
27+
}
28+
}
29+
```
30+
31+
## What about for v2 addons?
32+
33+
The [V2 Addon Blueprint](https://github.com/embroider-build/addon-blueprint) does not use nor need ember-cli-typescript, nor any of its features.
34+
35+
## What tsconfig.json should be used?
36+
37+
The official blueprints for apps and v1 addons (as of 2023-12-06) specifies:
38+
39+
<details><summary>for apps</summary>
40+
41+
```jsonc
42+
{
43+
"extends": "@tsconfig/ember/tsconfig.json",
44+
"compilerOptions": {
45+
// The combination of `baseUrl` with `paths` allows Ember's classic package
46+
// layout, which is not resolvable with the Node resolution algorithm, to
47+
// work with TypeScript.
48+
"baseUrl": ".",
49+
"paths": {
50+
"<%= name %>/tests/*": ["tests/*"],
51+
"<%= name %>/*": ["app/*"],
52+
"*": ["types/*"]
53+
}
54+
}
55+
}
56+
```
57+
58+
59+
60+
</details>
61+
62+
<details><summary>For v1 addons</summary>
63+
64+
```jsonc
65+
{
66+
"extends": "@tsconfig/ember/tsconfig.json",
67+
"compilerOptions": {
68+
// The combination of `baseUrl` with `paths` allows Ember's classic package
69+
// layout, which is not resolvable with the Node resolution algorithm, to
70+
// work with TypeScript.
71+
"baseUrl": ".",
72+
"paths": {
73+
"dummy/tests/*": ["tests/*"],
74+
"dummy/*": ["tests/dummy/app/*", "app/*"],
75+
"<%= addonName %>": ["addon"],
76+
"<%= addonName %>/*": ["addon/*"],
77+
"<%= addonName %>/test-support": ["addon-test-support"],
78+
"<%= addonName %>/test-support/*": ["addon-test-support/*"],
79+
"*": ["types/*"]
80+
}
81+
}
82+
}
83+
```
84+
85+
</details>
86+
87+
## What `@types/*` packages do I install?
88+
89+
<details><summary>if you're using ember-data</summary>
90+
91+
```
92+
"@types/ember": "^4.0.8",
93+
"@types/ember-data": "^4.4.13",
94+
"@types/ember-data__adapter": "^4.0.4",
95+
"@types/ember-data__model": "^4.0.3",
96+
"@types/ember-data__serializer": "^4.0.4",
97+
"@types/ember-data__store": "^4.0.5",
98+
"@types/ember__application": "^4.0.9",
99+
"@types/ember__array": "^4.0.7",
100+
"@types/ember__component": "^4.0.19",
101+
"@types/ember__controller": "^4.0.9",
102+
"@types/ember__debug": "^4.0.6",
103+
"@types/ember__destroyable": "^4.0.3",
104+
"@types/ember__engine": "^4.0.8",
105+
"@types/ember__error": "^4.0.4",
106+
"@types/ember__helper": "^4.0.4",
107+
"@types/ember__modifier": "^4.0.7",
108+
"@types/ember__object": "^4.0.9",
109+
"@types/ember__owner": "^4.0.7",
110+
"@types/ember__polyfills": "^4.0.4",
111+
"@types/ember__routing": "^4.0.17",
112+
"@types/ember__runloop": "^4.0.7",
113+
"@types/ember__service": "^4.0.6",
114+
"@types/ember__string": "^3.16.3",
115+
"@types/ember__template": "^4.0.4",
116+
"@types/ember__test": "^4.0.4",
117+
"@types/ember__utils": "^4.0.5",
118+
"@types/qunit": "^2.19.7",
119+
"@types/rsvp": "^4.0.6",
120+
```
121+
122+
</details>
123+
124+
<details><summary>if you're not using ember-data</summary>
125+
126+
You can use ember's built in types, so you only need the following:
127+
128+
```
129+
"@types/qunit": "^2.19.7",
130+
"@types/rsvp": "^4.0.6",
131+
```
132+
133+
Note that ember-data will eventually ship their own types, and allow _everyone_ to remove all the DT types.
134+
135+
</details>
136+
137+
138+
-----------------------------
139+
1140
<center><h1>ember-cli-typescript</h1></center>
2141

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

0 commit comments

Comments
 (0)