-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Embroider Support: Moved app factory module out of fastboot-app-… (#714)
Embroider Support: Moved app factory module out of fastboot-app-module
- Loading branch information
Showing
4 changed files
with
40 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
'use strict' | ||
|
||
// Added as app boot code to app.js that allows booting of the application | ||
// in browser. This code is injected during app-boot type of contentFor hook for ember-cli. | ||
module.exports = function fastbootAppBoot(prefix, configAppAsString, isModuleUnification) { | ||
var appSuffix = isModuleUnification ? "src/main" : "app"; | ||
return [ | ||
"", | ||
"if (typeof FastBoot === 'undefined') {", | ||
" if (!runningTests) {", | ||
" require('{{MODULE_PREFIX}}/" + appSuffix + "')['default'].create({{CONFIG_APP}});", | ||
" }", | ||
"}", | ||
"" | ||
].join("\n").replace(/\{\{MODULE_PREFIX\}\}/g, prefix).replace(/\{\{CONFIG_APP\}\}/g, configAppAsString); | ||
}; |
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