mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
feat: bundle workflow support (#7337)
This commit is contained in:
committed by
Vasil Chimev
parent
5f9eabdf17
commit
ecd9fc3e9d
@@ -36,7 +36,7 @@ export function getModuleName(path: string): string {
|
||||
return moduleName.substring(0, moduleName.lastIndexOf("."));
|
||||
}
|
||||
|
||||
export module layout {
|
||||
export module layoutCommon {
|
||||
const MODE_SHIFT = 30;
|
||||
const MODE_MASK = 0x3 << MODE_SHIFT;
|
||||
|
||||
@@ -51,9 +51,9 @@ export module layout {
|
||||
|
||||
export function getMode(mode: number): string {
|
||||
switch (mode) {
|
||||
case layout.EXACTLY:
|
||||
case layoutCommon.EXACTLY:
|
||||
return "Exact";
|
||||
case layout.AT_MOST:
|
||||
case layoutCommon.AT_MOST:
|
||||
return "AtMost";
|
||||
default:
|
||||
return "Unspecified";
|
||||
|
||||
@@ -4,6 +4,8 @@
|
||||
messageType as traceMessageType,
|
||||
} from "../trace";
|
||||
|
||||
import { layoutCommon } from "./utils-common";
|
||||
|
||||
export * from "./utils-common";
|
||||
|
||||
import { getNativeApplication, android as androidApp } from "../application";
|
||||
@@ -62,6 +64,10 @@ export module layout {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(webpack-workflow): Export all methods from layoutCommon
|
||||
// Think of a cleaner way to do that
|
||||
Object.assign(layout, layoutCommon);
|
||||
|
||||
// We are using "ad" here to avoid namespace collision with the global android object
|
||||
export module ad {
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
write as traceWrite, categories as traceCategories, messageType as traceMessageType
|
||||
} from "../trace";
|
||||
|
||||
import { layout as layoutCommon } from "./utils-common";
|
||||
import { layoutCommon } from "./utils-common";
|
||||
export * from "./utils-common";
|
||||
|
||||
let mainScreenScale;
|
||||
@@ -44,6 +44,10 @@ export module layout {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(webpack-workflow): Export all methods from layoutCommon
|
||||
// Think of a cleaner way to do that
|
||||
Object.assign(layout, layoutCommon);
|
||||
|
||||
export module ios {
|
||||
export function getter<T>(_this: any, property: T | { (): T }): T {
|
||||
console.log("utils.ios.getter() is deprecated; use the respective native property instead");
|
||||
|
||||
Reference in New Issue
Block a user