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-module
* Cleaned up fastboot-app-module. * Used broccoli-file-creator to insert app factory module as part of <app>-fastboot.js * This clean up ensures fastboot specific App-factory code is not shipped to browsers.
- Loading branch information
1 parent
538adf8
commit d0fbb39
Showing
4 changed files
with
40 additions
and
16 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