You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+24-27Lines changed: 24 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -44,24 +44,11 @@ This README focuses on basic information about setting up and using the addon. F
44
44
45
45
### Installation and Setup
46
46
47
-
***Note:* Because ember-cli-typescript is part of the build pipeline, the process for installing it differs slightly between apps and addons!**
48
-
49
-
#### In apps
50
-
51
-
In apps, you can simply `ember install` the dependency like normal:
52
-
47
+
You can simply `ember install` the dependency like normal:
53
48
```sh
54
49
ember install ember-cli-typescript@latest
55
50
```
56
51
57
-
#### In addons
58
-
59
-
To work properly, Ember addons must declare this library as a `dependency`, not a `devDependency`. You can `ember install` it by running:
60
-
61
-
```sh
62
-
ember install ember-cli-typescript@latest --save
63
-
```
64
-
65
52
All dependencies will be added to your `package.json`, and you're ready to roll! **If you're upgrading from a previous release, see below!** you should check to merge any tweaks you've made to `tsconfig.json`.
66
53
67
54
### Upgrading from 1.x
@@ -110,38 +97,48 @@ Follow the same process of deduplication, reinstallation, and re-deduplication a
110
97
111
98
#### Update ember-cli-typescript
112
99
113
-
***Note:* Because ember-cli-typescript is part of the build pipeline, the process for updating it differs slightly between apps and addons!**
114
-
115
-
##### In apps
116
-
117
-
In apps, you can simply `ember install` the dependency like normal:
100
+
Now you can simply `ember install` the dependency like normal:
118
101
119
102
```sh
120
103
ember install ember-cli-typescript@latest
121
104
```
122
105
123
-
##### In addons
106
+
***Note:* To work properly, starting from v2, ember-cli-typescript must be declared as a `dependency`, not a `devDependency` for addons. With `ember install` this migration will be automatically handled for you.**
124
107
125
-
To work properly, Ember addons must declare this library as a `dependency`, not a `devDependency`. **This is a *change* from ember-cli-typescript v1.**
108
+
If you choose to make the upgrade manually with yarn or npm, here are the steps you need to follow:
126
109
127
-
1. Remove ember-cli-typescript from your dependencies.
110
+
1. Remove ember-cli-typescript from your `devDependencies`.
128
111
129
112
With yarn:
130
-
113
+
131
114
```sh
132
-
yarn remove ember-cli-typescript
115
+
yarn remove ember-cli-typescript
133
116
```
134
117
135
118
With npm:
136
-
119
+
137
120
```sh
138
121
npm uninstall ember-cli-typescript
139
122
```
140
123
141
-
2. Re-install it with `ember install`:
124
+
2. Install the latest of ember-cli-typescript as a `dependency`:
Copy file name to clipboardExpand all lines: tests/dummy/app/templates/docs/index.md
+1-13Lines changed: 1 addition & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,23 +1,11 @@
1
1
# Installation
2
2
3
-
_**Note:** Because ember-cli-typescript is part of the build pipeline, the process for installing it differs slightly between apps and addons!_
4
-
5
-
## Installing in Apps
6
-
7
-
In apps, you can simply `ember install` the dependency like normal:
3
+
You can simply `ember install` the dependency like normal:
8
4
9
5
```sh
10
6
ember install ember-cli-typescript@latest
11
7
```
12
8
13
-
## Installing in Addons
14
-
15
-
To work properly, Ember addons must declare this library as a `dependency`, not a `devDependency`. You can `ember install` it by running:
16
-
17
-
```sh
18
-
ember install ember-cli-typescript@latest --save
19
-
```
20
-
21
9
All dependencies will be added to your `package.json`, and you're ready to roll! **If you're upgrading from a previous release, see below!** you should check to merge any tweaks you've made to `tsconfig.json`.
Copy file name to clipboardExpand all lines: tests/dummy/app/templates/docs/upgrade-notes.md
+30-19Lines changed: 30 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,17 +15,17 @@ ember-cli-typescript **requires** ember-cli-babel at version 7.1.0 or above, whi
15
15
The recommended approach here is to deduplicate existing installations of the dependency, remove and reinstall ember-cli-babel to make sure that all its transitive dependencies are updated to the latest possible, and then to deduplicate *again*.
16
16
17
17
If using yarn:
18
-
19
-
```
18
+
19
+
```sh
20
20
npx yarn-deduplicate
21
21
yarn remove ember-cli-babel
22
22
yarn add --dev ember-cli-babel
23
23
npx yarn-deduplicate
24
24
```
25
25
26
26
If using npm:
27
-
28
-
```
27
+
28
+
```sh
29
29
npm dedupe
30
30
npm uninstall ember-cli-babel
31
31
npm install --save-dev ember-cli-babel
@@ -34,7 +34,7 @@ npm dedupe
34
34
35
35
Note: If you are also using ember-decorators—and specifically the babel-transform that gets added with it—you will need update @ember-decorators/babel-transforms as well (anything over 3.1.0 should work):
36
36
37
-
```
37
+
```sh
38
38
ember install ember-decorators@^3.1.0 @ember-decorators/babel-transforms@^3.1.0
39
39
```
40
40
@@ -44,38 +44,48 @@ Follow the same process of deduplication, reinstallation, and re-deduplication a
44
44
45
45
## Update ember-cli-typescript
46
46
47
-
***Note:* Because ember-cli-typescript is part of the build pipeline, the process for updating it differs slightly between apps and addons!**
48
-
49
-
### In apps
50
-
51
-
In apps, you can simply `ember install` the dependency like normal:
47
+
Now you can simply `ember install` the dependency like normal:
52
48
53
49
```sh
54
50
ember install ember-cli-typescript@latest
55
51
```
56
52
57
-
### In addons
53
+
***Note:* To work properly, starting from v2, ember-cli-typescript must be declared as a `dependency`, not a `devDependency` for addons. With `ember install` this migration would be automatically handled for you.**
58
54
59
-
To work properly, Ember addons must declare this library as a `dependency`, not a `devDependency`. **This is a *change* from ember-cli-typescript v1.**
55
+
If you choose to make the upgrade manually with yarn or npm, here are the steps you need to follow:
60
56
61
-
1. Remove ember-cli-typescript from your dependencies.
57
+
1. Remove ember-cli-typescript from your `devDependencies`.
62
58
63
59
With yarn:
64
-
60
+
65
61
```sh
66
-
yarn remove ember-cli-typescript
62
+
yarn remove ember-cli-typescript
67
63
```
68
64
69
65
With npm:
70
-
66
+
71
67
```sh
72
68
npm uninstall ember-cli-typescript
73
69
```
74
70
75
-
2. Re-install it with `ember install`:
71
+
2. Install the latest of ember-cli-typescript as a `dependency`:
72
+
73
+
With yarn:
74
+
75
+
```sh
76
+
yarn add ember-cli-typescript@latest
77
+
```
78
+
79
+
With npm:
80
+
81
+
```sh
82
+
npm install --save ember-cli-typescript@latest
83
+
```
84
+
85
+
3. Run `ember generate`:
76
86
77
87
```sh
78
-
ember install ember-cli-typescript@latest --save
88
+
ember generate ember-cli-typescript
79
89
```
80
90
81
91
### Account for addon build pipeline changes
@@ -104,7 +114,7 @@ Any place where a type annotation overrides a *getter*
104
114
105
115
This breaks because `element` is a getter on `Component`. This declaration then shadows the getter declaration on the base class and stomps it to `undefined` (effectively `Object.defineProperty(this, 'element', void 0)`.
106
116
107
-
Two solutions—
117
+
Two solutions:
108
118
109
119
1. Annotate locally (slightly more annoying, but less likely to troll you):
110
120
@@ -144,6 +154,7 @@ Any place where a type annotation overrides a *getter*
0 commit comments