UNPKG

@notadd/cli

Version:

notadd core none dependence

21 lines (20 loc) 681 B
import { Command } from "@notadd/cli-core"; import { Controller, Args } from '@notadd/core'; import { run, RunOptions } from './run'; import { join } from 'path' @Controller() export class BuildCommand { @Command(`build`) build(@Args('root') root: string, @Args('o') output: string, @Args('d') del: boolean): any { root = root || process.cwd(); const options: RunOptions = { tsconfig: join(root, 'tsconfig.json'), src: root, output: join(root, output || 'dist'), types: join(root, 'dist'), watch: false, delete: !!del }; return run(options) } }