mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Make moduleMerge a global function - this saves a total of 83 requires upon application loading.
This commit is contained in:
@@ -6,7 +6,7 @@ import styleScope = require("ui/styling/style-scope");
|
||||
import observable = require("data/observable");
|
||||
|
||||
var events = new observable.Observable();
|
||||
require("utils/module-merge").merge(events, exports);
|
||||
global.moduleMerge(events, exports);
|
||||
|
||||
export var launchEvent = "launch";
|
||||
export var suspendEvent = "suspend";
|
||||
|
||||
@@ -4,9 +4,7 @@ import frame = require("ui/frame");
|
||||
import types = require("utils/types");
|
||||
import observable = require("data/observable");
|
||||
|
||||
// merge the exports of the application_common file with the exports of this file
|
||||
declare var exports;
|
||||
require("utils/module-merge").merge(appModule, exports);
|
||||
global.moduleMerge(appModule, exports);
|
||||
|
||||
export var mainModule: string;
|
||||
|
||||
|
||||
@@ -5,9 +5,7 @@ import types = require("utils/types");
|
||||
import view = require("ui/core/view");
|
||||
import definition = require("application");
|
||||
|
||||
// merge the exports of the application_common file with the exports of this file
|
||||
declare var exports;
|
||||
require("utils/module-merge").merge(appModule, exports);
|
||||
global.moduleMerge(appModule, exports);
|
||||
|
||||
export var mainModule: string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user