mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-15 11:01:21 +08:00
Co-authored-by: Dimitris - Rafail Katsampas <katsampasdr@gmail.com>
This commit is contained in:
@ -12,4 +12,4 @@ export interface PlatformContext {
|
||||
|
||||
export function findMatch(path: string, ext: string, candidates: Array<string>, context: PlatformContext): string;
|
||||
|
||||
export function stripQualifiers(path: string): string
|
||||
export function stripQualifiers(path: string): string;
|
||||
|
@ -15,7 +15,7 @@ const minWidthHeightQualifier: QualifierSpec = {
|
||||
return (new RegExp(`.${MIN_WH}\\d+`).test(path));
|
||||
},
|
||||
getMatchOccurences: function (path: string): Array<string> {
|
||||
return path.match(new RegExp(`.${MIN_WH}\\d+`));
|
||||
return path.match(new RegExp(`.${MIN_WH}\\d+`, "g"));
|
||||
},
|
||||
getMatchValue(value: string, context: PlatformContext): number {
|
||||
const numVal = parseInt(value.substr(MIN_WH.length + 1));
|
||||
@ -37,7 +37,7 @@ const minWidthQualifier: QualifierSpec = {
|
||||
return (new RegExp(`.${MIN_W}\\d+`).test(path)) && !(new RegExp(`.${MIN_WH}\\d+`).test(path));
|
||||
},
|
||||
getMatchOccurences: function (path: string): Array<string> {
|
||||
return path.match(new RegExp(`.${MIN_W}\\d+`));
|
||||
return path.match(new RegExp(`.${MIN_W}\\d+`, "g"));
|
||||
},
|
||||
getMatchValue(value: string, context: PlatformContext): number {
|
||||
const numVal = parseInt(value.substr(MIN_W.length + 1));
|
||||
@ -59,7 +59,7 @@ const minHeightQualifier: QualifierSpec = {
|
||||
return (new RegExp(`.${MIN_H}\\d+`).test(path)) && !(new RegExp(`.${MIN_WH}\\d+`).test(path));
|
||||
},
|
||||
getMatchOccurences: function (path: string): Array<string> {
|
||||
return path.match(new RegExp(`.${MIN_H}\\d+`));
|
||||
return path.match(new RegExp(`.${MIN_H}\\d+`, "g"));
|
||||
},
|
||||
getMatchValue(value: string, context: PlatformContext): number {
|
||||
const numVal = parseInt(value.substr(MIN_H.length + 1));
|
||||
@ -81,7 +81,7 @@ const platformQualifier: QualifierSpec = {
|
||||
return path.includes(".android") || path.includes(".ios");
|
||||
},
|
||||
getMatchOccurences: function (path: string): Array<string> {
|
||||
return [".android", ".ios"];
|
||||
return path.match(new RegExp("\\.android|\\.ios", "g"));
|
||||
},
|
||||
getMatchValue(value: string, context: PlatformContext): number {
|
||||
const val = value.substr(1);
|
||||
@ -95,7 +95,7 @@ const orientationQualifier: QualifierSpec = {
|
||||
return path.includes(".land") || path.includes(".port");
|
||||
},
|
||||
getMatchOccurences: function (path: string): Array<string> {
|
||||
return [".land", ".port"];
|
||||
return path.match(new RegExp("\\.land|\\.port", "g"));
|
||||
},
|
||||
getMatchValue(value: string, context: PlatformContext): number {
|
||||
const val = value.substr(1);
|
||||
|
Reference in New Issue
Block a user