0.1.0 • Published 2 years ago

@akiojin/command-builder v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

command-builder

This package implements a class that creates command line parameters.

Usage

import { CommandBuilder } from '@akiojin/command-builder'
const builder = new CommandBuilder()
builder.AddCommand('--verbose')
builder.AddCommand('--file', 'log.txt')
builder.AddCommand([ '--output', './out' ])
await execa.execa('foo', builder.Build())

Reference

class CommandBuilder

AddCommand(command: string | string[], param: string?): void

Description

Add a command.

Arguments
NameTypeDescription
commandstring | string[]Commands to pass to the Unity command line
paramstring?Parameters to be added to the command

Build(): string[]

Description

Returns an array of arguments to be passed to the command line.

Return
TypeDescription
string[]command array