diff --git a/packages/@guidesmiths/cuckoojs-schematics/src/basic-tooling/README.md b/packages/@guidesmiths/cuckoojs-schematics/src/basic-tooling/README.md index 60c435e..2089fb6 100644 --- a/packages/@guidesmiths/cuckoojs-schematics/src/basic-tooling/README.md +++ b/packages/@guidesmiths/cuckoojs-schematics/src/basic-tooling/README.md @@ -17,7 +17,6 @@ Check their correspondent README files for more info. | Option | Description | Requiered | Type | Default | |---------------|---------------------------------------------------------------------|---|---|---------| | `directory` | Root folder of your NestJS project | false | string | `.` | -| `skipInstall` | Root folder of your NestJS project | false | string | `false` | ## How to use it within a project diff --git a/packages/@guidesmiths/cuckoojs-schematics/src/basic-tooling/basic-tooling.factory.ts b/packages/@guidesmiths/cuckoojs-schematics/src/basic-tooling/basic-tooling.factory.ts index c34acd5..86729af 100644 --- a/packages/@guidesmiths/cuckoojs-schematics/src/basic-tooling/basic-tooling.factory.ts +++ b/packages/@guidesmiths/cuckoojs-schematics/src/basic-tooling/basic-tooling.factory.ts @@ -1,6 +1,5 @@ import { chain, - noop, type Rule, type SchematicContext, type Tree, @@ -9,11 +8,9 @@ import {schematic} from '@angular-devkit/schematics'; import {normalize} from '@angular-devkit/core'; import {execSync} from 'child_process'; import {resolve} from 'path'; -import {NodePackageInstallTask} from '@angular-devkit/schematics/tasks' interface Options { directory: string; - skipInstall: boolean; } export function main(options: Options): Rule { @@ -32,14 +29,6 @@ export function main(options: Options): Rule { schematic('commitlint', options), schematic('gitignore', options), schematic('nvmrc', options), - options.skipInstall ? noop() : installDependencies(), ]); }; } - -function installDependencies(): Rule { - return (tree: Tree, context: SchematicContext) => { - context.addTask(new NodePackageInstallTask()); - return tree; - }; -} diff --git a/packages/@guidesmiths/cuckoojs-schematics/src/basic-tooling/schema.json b/packages/@guidesmiths/cuckoojs-schematics/src/basic-tooling/schema.json index f014c8a..03cb9f1 100644 --- a/packages/@guidesmiths/cuckoojs-schematics/src/basic-tooling/schema.json +++ b/packages/@guidesmiths/cuckoojs-schematics/src/basic-tooling/schema.json @@ -8,11 +8,6 @@ "type": "string", "description": "destination directory.", "default": "." - }, - "skillInstall": { - "type": "boolean", - "description": "skip npm install.", - "default": false } } } diff --git a/packages/@guidesmiths/cuckoojs-schematics/src/nestjs-config/README.md b/packages/@guidesmiths/cuckoojs-schematics/src/nestjs-config/README.md index 1e4ccb3..e82b95e 100644 --- a/packages/@guidesmiths/cuckoojs-schematics/src/nestjs-config/README.md +++ b/packages/@guidesmiths/cuckoojs-schematics/src/nestjs-config/README.md @@ -18,7 +18,7 @@ env var defined via the `envVar` option. |---------------|-----------------------------------------------------------------------------|---|---------|------------| | `directory` | Root folder of your NestJS project | false | string | `.` | | `envVar` | Name of the env var that determines your environment during runtime | false | string | `NODE_ENV` | -| `skipInstall` | Skips the installation process of the packages included with this schematic | false | boolean | `false` | + ## How to use it within a project diff --git a/packages/@guidesmiths/cuckoojs-schematics/src/nestjs-config/nestjs-config.factory.ts b/packages/@guidesmiths/cuckoojs-schematics/src/nestjs-config/nestjs-config.factory.ts index 0fb2d60..77ea442 100644 --- a/packages/@guidesmiths/cuckoojs-schematics/src/nestjs-config/nestjs-config.factory.ts +++ b/packages/@guidesmiths/cuckoojs-schematics/src/nestjs-config/nestjs-config.factory.ts @@ -9,16 +9,13 @@ import { template, chain, url, - noop } from '@angular-devkit/schematics'; import {normalize} from '@angular-devkit/core'; -import {NodePackageInstallTask} from '@angular-devkit/schematics/tasks'; import {addConfigToModuleRule} from './utils/add-config-to-module-rule'; import {PackageJsonUtils} from '../utils/package-json.utils'; interface Options { directory: string; - skipInstall: boolean; } export function main(options: Options): Rule { @@ -42,7 +39,6 @@ export function main(options: Options): Rule { mergeWith(templateSource, MergeStrategy.Overwrite), addConfigToModuleRule(appFile), updatePackageJson(), - options.skipInstall ? noop() : installDependencies(), ]); }; } @@ -55,16 +51,8 @@ function updatePackageJson(): Rule { packageJsonUtils.addPackage('class-transformer', '^0.5.1', false); packageJsonUtils.addPackage('class-validator', '^0.14.0', false); packageJsonUtils.addPackage('lodash.merge', '^4.6.2', false); - return tree; }; } -function installDependencies(): Rule { - return (tree: Tree, context: SchematicContext) => { - context.addTask(new NodePackageInstallTask()); - - return tree; - }; -} diff --git a/packages/@guidesmiths/cuckoojs-schematics/src/nestjs-config/schema.json b/packages/@guidesmiths/cuckoojs-schematics/src/nestjs-config/schema.json index e91d3e9..0c85c4b 100644 --- a/packages/@guidesmiths/cuckoojs-schematics/src/nestjs-config/schema.json +++ b/packages/@guidesmiths/cuckoojs-schematics/src/nestjs-config/schema.json @@ -15,11 +15,6 @@ "description": "Name of the env var that determines the environment", "default": "NODE_ENV", "x-prompt": "What is the name of the env var that determines the environment where the app will be running?" - }, - "skillInstall": { - "type": "boolean", - "description": "skip npm install.", - "default": false } }, "required": ["directory", "envVar"]