Skip to content

Commit c3060a5

Browse files
authored
Merge pull request #349 from typed-ember/v2-blueprints-update
[v2] Install ember-cli-typescript-blueprints by default in the host
2 parents 7a76feb + 0116ae4 commit c3060a5

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ module.exports = {
2828
},
2929

3030
locals() {
31-
let updatePathsForAddon = require('ember-cli-typescript-blueprints/lib/utilities/update-paths-for-addon');
3231
let inRepoAddons = (this.project.pkg['ember-addon'] || {}).paths || [];
3332
let hasMirage = 'ember-cli-mirage' in (this.project.pkg.devDependencies || {});
3433
let isAddon = this.project.isEmberCLIAddon();
@@ -48,6 +47,8 @@ module.exports = {
4847
return {
4948
includes: JSON.stringify(includes.map(include => `${include}/**/*`), null, 2).replace(/\n/g, '\n '),
5049
pathsFor: dasherizedName => {
50+
// We need to wait to use this module until `ember-cli-typescript-blueprints` has been installed
51+
let updatePathsForAddon = require('ember-cli-typescript-blueprints/lib/utilities/update-paths-for-addon');
5152
let appName = isAddon ? 'dummy' : dasherizedName;
5253
let paths = {
5354
[`${appName}/tests/*`]: ['tests/*'],
@@ -118,14 +119,13 @@ module.exports = {
118119
// Entity name is optional right now, creating this hook avoids an error.
119120
},
120121

121-
afterInstall() {
122+
beforeInstall() {
122123
if (this.project.isEmberCLIAddon()) {
123124
this._installPrecompilationHooks();
124125
}
125126

126127
let packages = [
127-
// TODO release blueprints@2 that emit `.js` files in `app/`
128-
// { name: 'ember-cli-typescript-blueprints', target: '^2.0.0' },
128+
{ name: 'ember-cli-typescript-blueprints', target: '^2.0.0-beta.1' },
129129
{ name: 'typescript', target: 'latest' },
130130
{ name: '@types/ember', target: 'latest' },
131131
{ name: '@types/rsvp', target: 'latest' },

ts/tests/blueprints/ember-cli-typescript-test.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ describe('Acceptance: ember-cli-typescript generator', function() {
5353
const pkgJson = JSON.parse(pkg.content);
5454
expect(pkgJson.scripts.prepublishOnly).to.be.undefined;
5555
expect(pkgJson.scripts.postpublish).to.be.undefined;
56+
expect(pkgJson.devDependencies).to.include.all.keys('ember-cli-typescript-blueprints');
5657
expect(pkgJson.devDependencies).to.include.all.keys('ember-data');
5758
expect(pkgJson.devDependencies).to.include.all.keys('@types/ember-data');
5859
expect(pkgJson.devDependencies).to.include.all.keys('ember-qunit');

0 commit comments

Comments
 (0)