mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-26 11:17:04 +08:00
chore: variable rename
This commit is contained in:
2
packages/core/global-types.d.ts
vendored
2
packages/core/global-types.d.ts
vendored
@ -132,7 +132,7 @@ declare const __DEV__: string;
|
||||
declare const __CSS_PARSER__: string;
|
||||
declare const __NS_WEBPACK__: boolean;
|
||||
declare const __UI_CUSTOM_FLAVOR__: boolean;
|
||||
declare const __UI_XML_PARSER__: boolean;
|
||||
declare const __UI_USE_XML_PARSER__: boolean;
|
||||
declare const __ANDROID__: boolean;
|
||||
declare const __IOS__: boolean;
|
||||
|
||||
|
@ -223,7 +223,7 @@ export function getExports(instance: ViewBase): any {
|
||||
}
|
||||
|
||||
function parseInternal(value: string, context: any, xmlModule?: string, moduleName?: string): ComponentModule {
|
||||
if (__UI_XML_PARSER__) {
|
||||
if (__UI_USE_XML_PARSER__) {
|
||||
let start: xml2ui.XmlStringParser;
|
||||
let ui: xml2ui.ComponentParser;
|
||||
|
||||
|
@ -46,7 +46,7 @@ export namespace xml2ui {
|
||||
}
|
||||
|
||||
public parse(value: ParseInputData) {
|
||||
if (__UI_XML_PARSER__) {
|
||||
if (__UI_USE_XML_PARSER__) {
|
||||
const xmlParser = new xml.XmlParser(
|
||||
(args: xml.ParserEvent) => {
|
||||
try {
|
||||
@ -264,7 +264,7 @@ export namespace xml2ui {
|
||||
}
|
||||
|
||||
public buildTemplate(): Template {
|
||||
if (__UI_XML_PARSER__) {
|
||||
if (__UI_USE_XML_PARSER__) {
|
||||
const context = this._context;
|
||||
const errorFormat = this._templateProperty.errorFormat;
|
||||
const sourceTracker = this._templateProperty.sourceTracker;
|
||||
|
@ -195,7 +195,7 @@ export const itemTemplatesProperty = new Property<ListViewBase, string | Array<K
|
||||
name: 'itemTemplates',
|
||||
valueConverter: (value) => {
|
||||
if (typeof value === 'string') {
|
||||
if (__UI_XML_PARSER__) {
|
||||
if (__UI_USE_XML_PARSER__) {
|
||||
return Builder.parseMultipleTemplates(value, null);
|
||||
} else {
|
||||
return null;
|
||||
|
@ -223,7 +223,7 @@ export const itemTemplatesProperty = new Property<Repeater, string | Array<Keyed
|
||||
affectsLayout: true,
|
||||
valueConverter: (value) => {
|
||||
if (typeof value === 'string') {
|
||||
if (__UI_XML_PARSER__) {
|
||||
if (__UI_USE_XML_PARSER__) {
|
||||
return Builder.parseMultipleTemplates(value, null);
|
||||
} else {
|
||||
return null;
|
||||
|
@ -242,7 +242,7 @@ export default function (config: Config, env: IWebpackEnv): Config {
|
||||
{
|
||||
__DEV__: mode === 'development',
|
||||
__NS_WEBPACK__: true,
|
||||
__UI_XML_PARSER__: true,
|
||||
__UI_USE_XML_PARSER__: true,
|
||||
__UI_CUSTOM_FLAVOR__: projectUsesCustomFlavor(),
|
||||
__CSS_PARSER__: JSON.stringify(getValue('cssParser')), // todo: replace from config value
|
||||
__ANDROID__: platform === 'android',
|
||||
|
Reference in New Issue
Block a user