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