Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions src/cmd.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,20 @@ import { Command, EnumType } from '@cliffy/command'
import { ulid } from './lib/ulid.ts'
import { Config } from './lib/config.ts'
import { logger, LogLevel } from './lib/logger.ts'
import { VERSION } from './version.ts'

import { debug } from './commands/debug/index.ts'
import { engine } from './commands/engine/index.ts'
import { init } from './commands/init.ts'
import { uat } from './commands/uat.ts'
import { ubt } from './commands/ubt.ts'
import { buildgraph } from './commands/buildgraph/index.ts'
import { workflow } from './commands/workflow/index.ts'
import { script } from './commands/script.ts'
import { uasset } from './commands/uasset/index.ts'
import { auth } from './commands/auth.ts'
import { project } from './commands/project/index.ts'
import { listTargets } from './commands/list-targets.ts'
const LogLevelType = new EnumType(LogLevel)

export const cmd = new Command()
Expand Down Expand Up @@ -30,3 +43,23 @@ export const cmd = new Command()
// We load the config here so that the singleton should be instantiated before any command is run
await Config.create({ path: options.configPath })
})

export const cli = cmd
.name('runreal')
.version(VERSION)
.description('the Unreal Engine runner')
.action(function () {
this.showHelp()
})
.command('init', init)
.command('debug', debug)
.command('list-targets', listTargets)
.command('engine', engine)
.command('uat', uat)
.command('ubt', ubt)
.command('buildgraph', buildgraph)
.command('workflow', workflow)
.command('script', script)
.command('auth', auth)
.command('uasset', uasset)
.command('project', project)
37 changes: 2 additions & 35 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,3 @@
import { VERSION } from './version.ts'
import { cli } from './cmd.ts'

import { debug } from './commands/debug/index.ts'
import { engine } from './commands/engine/index.ts'
import { init } from './commands/init.ts'
import { uat } from './commands/uat.ts'
import { ubt } from './commands/ubt.ts'
import { buildgraph } from './commands/buildgraph/index.ts'
import { workflow } from './commands/workflow/index.ts'
import { cmd } from './cmd.ts'
import { script } from './commands/script.ts'
import { uasset } from './commands/uasset/index.ts'
import { auth } from './commands/auth.ts'
import { project } from './commands/project/index.ts'
import { listTargets } from './commands/list-targets.ts'

await cmd
.name('runreal')
.version(VERSION)
.description('the Unreal Engine runner')
.action(function () {
this.showHelp()
})
.command('init', init)
.command('debug', debug)
.command('list-targets', listTargets)
.command('engine', engine)
.command('uat', uat)
.command('ubt', ubt)
.command('buildgraph', buildgraph)
.command('workflow', workflow)
.command('script', script)
.command('auth', auth)
.command('uasset', uasset)
.command('project', project)
.parse(Deno.args)
await cli.parse(Deno.args)