feat(js): skipPackageJson in js lib generator (#19821)

This commit is contained in:
Katerina Skroumpelou 2023-10-26 19:53:02 +03:00 committed by GitHub
parent 2ea9f18fad
commit 7942ea3c83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 2 deletions

View File

@ -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.",

View File

@ -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 () => {};
}

View File

@ -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.",

View File

@ -14,6 +14,7 @@ export interface LibraryGeneratorSchema {
skipFormat?: boolean;
tags?: string;
skipTsConfig?: boolean;
skipPackageJson?: boolean;
includeBabelRc?: boolean;
unitTestRunner?: 'jest' | 'vitest' | 'none';
linter?: Linter;