-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow usage of blueprint within a blueprinted project.
Prior to these changes running `ember init -b @glimmer/blueprint` would always download the `latest` release from `npm`'s registry for `@glimmer/blueprint`. This means that it is impossible to actually control your upgrading process. This change makes this package *both* a stand alone blueprint package *and* an addon. The addon creates a blueprint for `@glimmer/blueprint` so that now `ember init -b @glimmer/blueprint` will use whatever version of `@glimmer/blueprint` that you happen to have installed. This mirrors the way ember-cli upgrades work (where you first update the version of ember-cli in the project, then you run `ember init` with that version). Ultimately, this commit should be able to be revertted once the upstream issue is resolved: ember-cli/ember-cli#6952.
- Loading branch information
Showing
3 changed files
with
50 additions
and
1 deletion.
There are no files selected for viewing
26 changes: 26 additions & 0 deletions
26
packages/@glimmer/blueprint/blueprints/@glimmer/blueprint/index.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
'use strict'; | ||
const path = require('path'); | ||
const MainBlueprint = require('../../../index'); | ||
|
||
/* | ||
Create an "addon blueprint" that simply defers to our | ||
top level entry point as the blueprint. | ||
This is basically just a work around for | ||
https://github.com/ember-cli/ember-cli/issues/6952. | ||
Once that issue is fixed and released we can remove: | ||
* ember-addon keyword in package.json | ||
* ember-addon key in package.json | ||
* ember-addon-main.js file | ||
* blueprints/ folder | ||
*/ | ||
module.exports = Object.assign({}, MainBlueprint, { | ||
init() { | ||
this._super.init.apply(this, arguments); | ||
|
||
this.path = path.join(__dirname, '..', '..', '..'); | ||
this.name = '@glimmer/blueprint'; | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
'use strict'; | ||
|
||
/* | ||
Create an "addon blueprint" that simply defers to our | ||
top level entry point as the blueprint. | ||
This is basically just a work around for | ||
https://github.com/ember-cli/ember-cli/issues/6952. | ||
Once that issue is fixed and released we can remove: | ||
* ember-addon keyword in package.json | ||
* ember-addon key in package.json | ||
* ember-addon-main.js file | ||
* blueprints/ folder | ||
*/ | ||
module.exports = { | ||
name: '@glimmer/blueprint' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters