File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -525,6 +525,8 @@ export async function generateCode(args: yargs.Arguments<any>): Promise<void> {
525525 * @param args program arguments
526526 */
527527export async function handler ( args : yargs . Arguments ) : Promise < void > {
528+ args . name = strings . dasherize ( args . name as string ) ;
529+
528530 if ( args . n ) {
529531 await generateCode ( args ) ;
530532 } else {
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import { ChildProcess, spawn } from 'child_process';
66import { writeFile } from 'fs' ;
77import fetch from 'node-fetch' ;
88import { join , resolve } from 'path' ;
9+ import { strings } from '@angular-devkit/core' ;
910
1011export function mapSchematicOptions ( collectionName : string , options : Input [ ] ) : string [ ] {
1112 return options . reduce (
@@ -86,10 +87,11 @@ export async function addGitIgnore(folder: string): Promise<void> {
8687}
8788
8889export async function initGit ( appPath : string ) : Promise < void > {
90+ const path = strings . dasherize ( appPath ) ;
8991 console . log ( chalk . blueBright ( 'Initializing git repository... please wait' ) ) ;
9092 const runner = new GitRunner ( ) ;
91- await runner . run ( 'init' , true , join ( process . cwd ( ) , appPath ) ) ;
92- await addGitIgnore ( join ( process . cwd ( ) , appPath ) ) ;
93+ await runner . run ( 'init' , true , join ( process . cwd ( ) , path ) ) ;
94+ await addGitIgnore ( join ( process . cwd ( ) , path ) ) ;
9395 console . log ( chalk . greenBright ( 'Git initialization ends successfuly' ) ) ;
9496}
9597
You can’t perform that action at this time.
0 commit comments