chore: cleanup

This commit is contained in:
Nathan Walker
2020-07-06 23:27:18 -07:00
parent 49cd2f0df3
commit c6902538cf
62 changed files with 328 additions and 182 deletions

View File

@@ -7,7 +7,7 @@ import { isEventOrGesture } from '../../core/bindable';
import { getBindingOptions, bindingConstants } from '../binding-builder';
import { profile } from '../../../profiling';
import * as debugModule from '../../../utils/debug';
import * as platform from '../../../platform';
import { Device } from '../../../platform';
import { sanitizeModuleName } from '../module-name-sanitizer';
import { resolveModuleName } from '../../../module-name-resolver';
@@ -115,7 +115,7 @@ const applyComponentAttributes = profile('applyComponentAttributes', (instance:
if (attr.indexOf(':') !== -1) {
const platformName = attr.split(':')[0].trim();
if (platformName.toLowerCase() === platform.device.os.toLowerCase()) {
if (platformName.toLowerCase() === Device.os.toLowerCase()) {
attr = attr.split(':')[1].trim();
} else {
continue;

View File

@@ -9,7 +9,7 @@ import { debug, ScopeError, SourceError, Source } from '../../utils/debug';
import * as xml from '../../xml';
import { isString, isObject, isDefined } from '../../utils/types';
import { ComponentModule, setPropertyValue, getComponentModule } from './component-builder';
import { platformNames, device } from '../../platform';
import { platformNames, Device } from '../../platform';
import { profile } from '../../profiling';
import { sanitizeModuleName } from './module-name-sanitizer';
import { resolveModuleName } from '../../module-name-resolver';
@@ -368,7 +368,7 @@ namespace xml2ui {
}
private static isCurentPlatform(value: string): boolean {
return value && value.toLowerCase() === device.os.toLowerCase();
return value && value.toLowerCase() === Device.os.toLowerCase();
}
}
@@ -579,7 +579,7 @@ namespace xml2ui {
this.sourceTracker = sourceTracker;
}
@profile()
@profile
private buildComponent(args: xml.ParserEvent): ComponentModule {
if (args.prefix && args.namespace) {
// Custom components