feat(expo): add option for skipPackageJson for expo generators (#14570)
This commit is contained in:
parent
b110275f9c
commit
42b9be2a11
@ -77,6 +77,11 @@
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"x-deprecated": "Nx only supports standaloneConfig"
|
||||
},
|
||||
"skipPackageJson": {
|
||||
"type": "boolean",
|
||||
"description": "Do not add dependencies to `package.json`.",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"required": ["name"],
|
||||
|
||||
@ -25,6 +25,11 @@
|
||||
"type": "string",
|
||||
"enum": ["detox", "none"],
|
||||
"default": "detox"
|
||||
},
|
||||
"skipPackageJson": {
|
||||
"type": "boolean",
|
||||
"description": "Do not add dependencies to `package.json`.",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"required": [],
|
||||
|
||||
@ -88,6 +88,11 @@
|
||||
"type": "boolean",
|
||||
"description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.",
|
||||
"default": false
|
||||
},
|
||||
"skipPackageJson": {
|
||||
"type": "boolean",
|
||||
"description": "Do not add dependencies to `package.json`.",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"required": ["name"],
|
||||
|
||||
@ -15,4 +15,5 @@ export interface Schema {
|
||||
setParserOptionsProject?: boolean; // default is false
|
||||
e2eTestRunner: 'detox' | 'none'; // default is detox
|
||||
standaloneConfig?: boolean;
|
||||
skipPackageJson?: boolean; // default is false
|
||||
}
|
||||
|
||||
@ -77,6 +77,11 @@
|
||||
"type": "boolean",
|
||||
"default": true,
|
||||
"x-deprecated": "Nx only supports standaloneConfig"
|
||||
},
|
||||
"skipPackageJson": {
|
||||
"type": "boolean",
|
||||
"description": "Do not add dependencies to `package.json`.",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"required": ["name"]
|
||||
|
||||
@ -42,7 +42,12 @@ export async function expoInitGenerator(host: Tree, schema: Schema) {
|
||||
addGitIgnoreEntry(host);
|
||||
initRootBabelConfig(host);
|
||||
|
||||
const tasks = [moveDependency(host), updateDependencies(host)];
|
||||
const tasks = [];
|
||||
|
||||
if (!schema.skipPackageJson) {
|
||||
tasks.push(moveDependency(host));
|
||||
tasks.push(updateDependencies(host));
|
||||
}
|
||||
|
||||
if (!schema.unitTestRunner || schema.unitTestRunner === 'jest') {
|
||||
const jestTask = jestInitGenerator(host, {});
|
||||
|
||||
@ -2,4 +2,5 @@ export interface Schema {
|
||||
unitTestRunner?: 'jest' | 'none';
|
||||
skipFormat?: boolean;
|
||||
e2eTestRunner?: 'detox' | 'none';
|
||||
skipPackageJson?: boolean; // default is false
|
||||
}
|
||||
|
||||
@ -22,6 +22,11 @@
|
||||
"type": "string",
|
||||
"enum": ["detox", "none"],
|
||||
"default": "detox"
|
||||
},
|
||||
"skipPackageJson": {
|
||||
"type": "boolean",
|
||||
"description": "Do not add dependencies to `package.json`.",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"required": []
|
||||
|
||||
@ -18,4 +18,5 @@ export interface Schema {
|
||||
js: boolean; // default is false
|
||||
strict: boolean; // default is true
|
||||
setParserOptionsProject?: boolean;
|
||||
skipPackageJson?: boolean; // default is false
|
||||
}
|
||||
|
||||
@ -88,6 +88,11 @@
|
||||
"type": "boolean",
|
||||
"description": "Whether or not to configure the ESLint \"parserOptions.project\" option. We do not do this by default for lint performance reasons.",
|
||||
"default": false
|
||||
},
|
||||
"skipPackageJson": {
|
||||
"type": "boolean",
|
||||
"description": "Do not add dependencies to `package.json`.",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"required": ["name"]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user