Fixed most module cyclic references. There is one left for ios and android: (#4978)

- http -> http-request -> image-source
that can't be fixed easily and will be removed once we delete image-source module because it is obsolete anyway.
There is one more for android:
- frame -> fragment that could be removed if we use global object.
Updated madge bersion
This commit is contained in:
Hristo Hristov
2017-11-10 15:47:02 +02:00
committed by GitHub
parent 729b068e7b
commit 43fbabb5e9
19 changed files with 227 additions and 236 deletions

View File

@@ -19,6 +19,8 @@ export { Observable };
import { UnhandledErrorEventData, iOSApplication, AndroidApplication, CssChangedEventData, LoadAppCSSEventData } from ".";
export { UnhandledErrorEventData, CssChangedEventData, LoadAppCSSEventData };
export const launchEvent = "launch";
export const suspendEvent = "suspend";
export const displayedEvent = "displayed";
@@ -54,7 +56,11 @@ export function setApplication(instance: iOSApplication | AndroidApplication): v
}
export function livesync() {
events.notify(<EventData>{ eventName: "livesync", object: app });
events.notify(<EventData>{ eventName: "livesync", object: app });
const liveSyncCore = global.__onLiveSyncCore;
if (liveSyncCore) {
liveSyncCore();
}
}
export function setCssFileName(cssFileName: string) {
@@ -76,4 +82,4 @@ export function addCss(cssText: string): void {
global.__onUncaughtError = function (error: NativeScriptError) {
events.notify(<UnhandledErrorEventData>{ eventName: uncaughtErrorEvent, object: app, android: error, ios: error, error: error });
}
}