Skip to content

Commit 0cda33b

Browse files
authored
Fix description of v1/v2 add-ons
The previous suggested change was supposed to include this, but missed it because of nested code blocks inside the suggested change. Whoops!
1 parent b952c4c commit 0cda33b

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

README.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,34 @@ With every release, we output the `--typescript` output of new ember apps to thi
99

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

12-
1312
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).
1413

15-
Additionally, you will need the `tsconfig.json` generated by the Ember TypeScript blueprint (see above), and then can run [`glint`](https://typed-ember.gitbook.io/glint) or `tsc` directly on the CLI. (Again, see the official docs for details!)
14+
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!)
1615

1716
### Apps
1817

1918
```js
2019
'ember-cli-babel': {
2120
enableTypeScriptTransform: true,
2221
},
22+
```
23+
24+
### v1 addons
25+
26+
Configure this in the addon's `index.js` in the root of the project:
27+
28+
```js
29+
module.exports = {
30+
name: require('package').name,
31+
options: {
32+
'ember-cli-babel': {
33+
enableTypeScriptTransform: true
34+
}
35+
}
36+
}
37+
```
38+
39+
### v2 addons
2340

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

0 commit comments

Comments
 (0)