feat(core): nativescript.config and webpack updates (#8801)

This commit is contained in:
Nathan Walker
2020-09-01 15:53:37 -07:00
committed by GitHub
parent 757a2ffdf7
commit 54cce4f20c
1093 changed files with 332 additions and 316 deletions

View File

@@ -44,6 +44,13 @@ const isVue = ({ projectDir, packageJson } = {}) => {
.some(dependency => dependency === "nativescript-vue");
};
const isReact = ({ projectDir, packageJson } = {}) => {
packageJson = packageJson || getPackageJson(projectDir);
return packageJson.dependencies && Object.keys(packageJson.dependencies)
.some(dependency => dependency === "react-nativescript");
};
const getPackageJson = projectDir => {
const packageJsonPath = getPackageJsonPath(projectDir);
const result = readJsonFile(packageJsonPath);
@@ -137,6 +144,7 @@ module.exports = {
isPlugin,
getAngularVersion,
isVue,
isReact,
isTypeScript,
writePackageJson,
convertSlashesInPath,