File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -35,7 +35,8 @@ Options:
3535
3636Commands:
3737 cm [message] Submit commit
38- ac [message] Ament last commit
38+ ac [message] Amend last commit
39+ list List available commit types
3940 update Update gitmo cli
4041 help [command] display help for command
4142
@@ -85,7 +86,7 @@ press ENTER
8586bun run build
8687
8788# Run command
88- node ./dist/cli .js gitmo cm
89+ node ./dist/index .js cm
8990```
9091
9192---
Original file line number Diff line number Diff line change 11import { Command } from "commander" ;
22import shell from "shelljs" ;
33import packageJson from "../package.json" ;
4+ import emojisData from "@/emojis-data.json" ;
45
56import transformMessage from "@/utils/transformMessage.js" ;
67import hasStagedChanges from "@/utils/hasStagedChanges.js" ;
@@ -38,7 +39,7 @@ const gitmo = () => {
3839
3940 program
4041 . command ( "ac [message]" )
41- . description ( "Ament last commit" )
42+ . description ( "Amend last commit" )
4243 . action ( async ( message ) => {
4344 if ( message ) {
4445 const transformedMessage = await transformMessage ( message ) ;
@@ -50,6 +51,18 @@ const gitmo = () => {
5051 }
5152 } ) ;
5253
54+ program
55+ . command ( "list" )
56+ . description ( "List available commit types" )
57+ . action ( async ( ) => {
58+ console . log ( "\n COMMIT TYPES \n" ) ;
59+ for ( let i = 0 ; i < emojisData . length ; i ++ ) {
60+ const { name, emoji, description } = emojisData [ i ] ;
61+ console . log ( `${ emoji } ${ name . toString ( ) } : ${ description } ` ) ;
62+ }
63+ console . log ( "\n" ) ;
64+ } ) ;
65+
5366 program
5467 . command ( "update" )
5568 . description ( "Update gitmo cli" )
You can’t perform that action at this time.
0 commit comments