Merge branch 'release/8.1.0' of https://github.com/NativeScript/NativeScript into release/8.1.0

This commit is contained in:
Nathan Walker
2021-08-10 13:34:39 -07:00

View File

@ -3,26 +3,15 @@ import { getAllDependencies } from './dependencies';
import { error } from './log';
/**
* Utility to determine the project flavor based on installed dependencies
* (vue, angular, react, svelete, typescript, javascript...)
* Utility to determine if the project uses an external flavor/framework
*/
export function projectUsesCustomFlavor(): boolean {
const dependencies = getAllDependencies();
return [
'vue',
'angular',
'react',
'svelte'
].includes(determineProjectFlavor())
if (dependencies.includes('nativescript-vue') ||
dependencies.includes('@nativescript/angular') ||
dependencies.includes('react-nativescript') ||
dependencies.includes('svelte-native')
) {
return true;
}
const projectFlavor = determineProjectFlavor();
return false;
return (
projectFlavor &&
['vue', 'angular', 'react', 'svelte'].includes(projectFlavor)
);
}
/**
* Utility to determine the project flavor based on installed dependencies