Skip to content

Commit

Permalink
feat(): add strict option on new command
Browse files Browse the repository at this point in the history
This addresses the issue nestjs/schematics#597

Now users can use:
$ nest new --strict
if they want to create a project with TS's strict mode enabled
  • Loading branch information
micalevisk committed Sep 28, 2021
1 parent de611bc commit c028737
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions commands/new.command.ts
Expand Up @@ -28,13 +28,15 @@ export class NewCommand extends AbstractCommand {
'-c, --collection [collectionName]',
'Schematics collection to use.',
)
.option('--strict', 'Enables strict mode in TypeScript.')
.action(async (name: string, command: Command) => {
const options: Input[] = [];
const availableLanguages = ['js', 'ts', 'javascript', 'typescript'];
options.push({ name: 'directory', value: command.directory });
options.push({ name: 'dry-run', value: !!command.dryRun });
options.push({ name: 'skip-git', value: !!command.skipGit });
options.push({ name: 'skip-install', value: !!command.skipInstall });
options.push({ name: 'strict', value: !!command.strict });
options.push({
name: 'package-manager',
value: command.packageManager,
Expand Down

0 comments on commit c028737

Please sign in to comment.