Skip to content

Commit

Permalink
Added module cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
FadTheChad committed Jun 8, 2023
1 parent c446591 commit e806a50
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions src/commands/module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { Argument, Command } from 'commander'
import fs from 'fs'
import Cli from '../modules/Cli'
import FileManager from '../modules/FileManager'

const command = new Command()
.command('module')
.description('Create a module method')
.argument('<module>', 'The module name for which the method is created')
.argument('<name>', 'The name of the method')
.action((module: string) => {
return Cli.load({
callback: async () => {
return await new FileManager()
},
component: 'module',
beforeText: 'Creating module',
afterText: 'Created',
})
})

0 comments on commit e806a50

Please sign in to comment.