Skip to content

Commit 8996ac3

Browse files
committed
feat: install @types/ember packages separately via blueprint
1 parent 7b01db0 commit 8996ac3

File tree

1 file changed

+36
-15
lines changed
  • ts/blueprints/ember-cli-typescript

1 file changed

+36
-15
lines changed

ts/blueprints/ember-cli-typescript/index.js

Lines changed: 36 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -144,32 +144,53 @@ module.exports = {
144144
}
145145

146146
let packages = [
147-
{ name: 'ember-cli-typescript-blueprints', target: 'latest' },
148-
{ name: 'typescript', target: 'latest' },
149-
{ name: '@types/ember', target: 'latest' },
150-
{ name: '@types/ember__test-helpers', target: 'latest' },
151-
{ name: '@types/ember-resolver', target: 'latest' },
147+
'typescript',
148+
'ember-cli-typescript-blueprints',
149+
'@types/ember-resolver',
150+
'@types/ember__test-helpers',
151+
'@types/ember__object',
152+
'@types/ember__service',
153+
'@types/ember__controller',
154+
'@types/ember__string',
155+
'@types/ember__template',
156+
'@types/ember__polyfills',
157+
'@types/ember__utils',
158+
'@types/ember__runloop',
159+
'@types/ember__debug',
160+
'@types/ember__engine',
161+
'@types/ember__application',
162+
'@types/ember__test',
163+
'@types/ember__array',
164+
'@types/ember__error',
165+
'@types/ember__component',
166+
'@types/ember__routing',
167+
'@types/rsvp',
168+
'@types/htmlbars-inline-precompile',
152169
];
153170

171+
if (this._has('@ember/jquery')) {
172+
packages.push('@types/jquery');
173+
}
174+
154175
if (this._has('ember-data')) {
155-
packages.push({ name: '@types/ember-data', target: 'latest' });
176+
packages.push('@types/ember-data');
156177
}
157178

158179
if (this._has('ember-cli-qunit') || this._has('ember-qunit')) {
159-
packages = packages.concat([
160-
{ name: '@types/ember-qunit', target: 'latest' },
161-
{ name: '@types/qunit', target: 'latest' },
162-
]);
180+
packages.push('@types/ember-qunit');
181+
packages.push('@types/qunit');
163182
}
164183

165184
if (this._has('ember-cli-mocha') || this._has('ember-mocha')) {
166-
packages = packages.concat([
167-
{ name: '@types/ember-mocha', target: 'latest' },
168-
{ name: '@types/mocha', target: 'latest' },
169-
]);
185+
packages.push('@types/ember-mocha');
186+
packages.push('@types/mocha');
170187
}
171188

172-
return this.addPackagesToProject(packages);
189+
return this.addPackagesToProject(
190+
packages.map((name) => {
191+
return { name, target: 'latest' };
192+
})
193+
);
173194
},
174195

175196
filesPath() {

0 commit comments

Comments
 (0)