Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from ef4/fix-initializers
Run initializers and instance-initializers inside engines
- Loading branch information
Showing
9 changed files
with
113 additions
and
9 deletions.
There are no files selected for viewing
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
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
10 changes: 8 additions & 2 deletions
10
blueprints/in-repo-engine/routable-files/lib/__name__/addon/engine.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 |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import Engine from 'ember-engines/engine'; | ||
import Resolver from 'ember-engines/resolver'; | ||
import loadInitializers from 'ember-load-initializers'; | ||
|
||
export default Engine.extend({ | ||
modulePrefix: '<%= dasherizedModuleName %>', | ||
const modulePrefix = 'ember-blog'; | ||
const Eng = Engine.extend({ | ||
modulePrefix, | ||
Resolver | ||
}); | ||
|
||
loadInitializers(Eng, modulePrefix); | ||
|
||
export default Eng; |
10 changes: 8 additions & 2 deletions
10
blueprints/in-repo-engine/routeless-files/lib/__name__/addon/engine.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 |
---|---|---|
@@ -1,7 +1,13 @@ | ||
import Engine from 'ember-engines/engine'; | ||
import Resolver from 'ember-engines/resolver'; | ||
import loadInitializers from 'ember-load-initializers'; | ||
|
||
export default Engine.extend({ | ||
modulePrefix: '<%= dasherizedModuleName %>', | ||
const modulePrefix = 'ember-blog'; | ||
const Eng = Engine.extend({ | ||
modulePrefix, | ||
Resolver | ||
}); | ||
|
||
loadInitializers(Eng, modulePrefix); | ||
|
||
export default Eng; |
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
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
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
6 changes: 6 additions & 0 deletions
6
tests/dummy/lib/ember-blog/addon/initializers/ember-blog-initializer.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,6 @@ | ||
export default { | ||
name: 'ember-blog-initializer', | ||
initialize() { | ||
|
||
} | ||
} |
5 changes: 5 additions & 0 deletions
5
tests/dummy/lib/ember-blog/addon/instance-initializers/ember-blog-instance-initializer.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,5 @@ | ||
export default { | ||
name: 'ember-blog-instance-initializer', | ||
initialize() { | ||
} | ||
} |