Skip to content

Commit

Permalink
Fix description of v1/v2 add-ons
Browse files Browse the repository at this point in the history
The previous suggested change was supposed to include this, but missed
it because of nested code blocks inside the suggested change. Whoops!
  • Loading branch information
chriskrycho authored Dec 7, 2023
1 parent b952c4c commit 0cda33b
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,34 @@ With every release, we output the `--typescript` output of new ember apps to thi

## 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 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!)
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.

Expand Down

0 comments on commit 0cda33b

Please sign in to comment.