feat(js): skipPackageJson in js lib generator (#19821)
This commit is contained in:
parent
2ea9f18fad
commit
7942ea3c83
@ -48,6 +48,12 @@
|
||||
"default": false,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"skipPackageJson": {
|
||||
"description": "Do not add dependencies to `package.json`.",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"skipTsConfig": {
|
||||
"type": "boolean",
|
||||
"description": "Do not update tsconfig.json for development experience.",
|
||||
|
||||
@ -74,7 +74,9 @@ export async function libraryGeneratorInternal(
|
||||
|
||||
addProject(tree, options);
|
||||
|
||||
tasks.push(addProjectDependencies(tree, options));
|
||||
if (!options.skipPackageJson) {
|
||||
tasks.push(addProjectDependencies(tree, options));
|
||||
}
|
||||
|
||||
if (options.publishable) {
|
||||
tasks.push(await setupVerdaccio(tree, { ...options, skipFormat: true }));
|
||||
@ -708,7 +710,6 @@ function addProjectDependencies(
|
||||
}
|
||||
|
||||
// Vite is being installed in the next step if bundler is vite
|
||||
|
||||
// noop
|
||||
return () => {};
|
||||
}
|
||||
|
||||
@ -48,6 +48,12 @@
|
||||
"default": false,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"skipPackageJson": {
|
||||
"description": "Do not add dependencies to `package.json`.",
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
"x-priority": "internal"
|
||||
},
|
||||
"skipTsConfig": {
|
||||
"type": "boolean",
|
||||
"description": "Do not update tsconfig.json for development experience.",
|
||||
|
||||
1
packages/js/src/utils/schema.d.ts
vendored
1
packages/js/src/utils/schema.d.ts
vendored
@ -14,6 +14,7 @@ export interface LibraryGeneratorSchema {
|
||||
skipFormat?: boolean;
|
||||
tags?: string;
|
||||
skipTsConfig?: boolean;
|
||||
skipPackageJson?: boolean;
|
||||
includeBabelRc?: boolean;
|
||||
unitTestRunner?: 'jest' | 'vitest' | 'none';
|
||||
linter?: Linter;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user