Skip to content

Commit

Permalink
feature() use latest schematics engine (prompts)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed Jan 18, 2019
1 parent a49e343 commit 9dbdb17
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion commands/generate.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { Input } from './command.input';
export class GenerateCommand extends AbstractCommand {
public load(program: CommanderStatic) {
program
.command('generate <schematic> <name> [path]')
.command('generate <schematic> [name] [path]')
.alias('g')
.description(this.buildDescription())
.option('--dry-run', 'Allow to test changes before command execution')
Expand Down
8 changes: 7 additions & 1 deletion lib/configuration/nest-configuration.loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@ export class NestConfigurationLoader implements ConfigurationLoader {
'nest-cli.json',
'nest.json',
]);
return content ? JSON.parse(content) : defaultConfiguration;
if (!content) {
return defaultConfiguration;
}
return {
...defaultConfiguration,
...JSON.parse(content),
};
}
}
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nestjs/cli",
"version": "5.7.2",
"version": "5.8.0",
"description": "Nest - modern, fast, powerful node.js web framework (@cli)",
"publishConfig": {
"access": "public"
Expand Down Expand Up @@ -34,10 +34,10 @@
},
"homepage": "https://github.com/nestjs/nest-cli#readme",
"dependencies": {
"@angular-devkit/core": "7.1.2",
"@angular-devkit/schematics": "7.1.2",
"@angular-devkit/schematics-cli": "^0.12.1",
"@nestjs/schematics": "^5.11.3",
"@angular-devkit/core": "7.2.2",
"@angular-devkit/schematics": "7.2.2",
"@angular-devkit/schematics-cli": "^0.12.2",
"@nestjs/schematics": "^5.12.0",
"chalk": "^2.4.1",
"cli-table2": "^0.2.0",
"commander": "^2.19.0",
Expand Down
1 change: 1 addition & 0 deletions test/lib/configuration/nest-configuration.loader.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ describe('Nest Configuration Loader', () => {
expect(configuration).toEqual({
language: 'ts',
collection: '@nestjs/schematics',
sourceRoot: 'src',
});
});
});

0 comments on commit 9dbdb17

Please sign in to comment.