Application
#
Hierarchy- Application
#
Index#
Properties#
Accessors#
Methods#
Object literals#
Properties#
argv• argv: string[] | ParsedArgs = []
执行命令的参数
#
download_path• download_path: string = path.join(process.cwd(), 'target/cache')
download 目录
#
packageJSON• packageJSON: any = null
package.json 信息
#
root• root: string = process.cwd()
项目主目录
Optional
task_path#
• task_path? : undefined | string = undefined
task 文件地址
#
tasks• tasks: object
#
Type declaration:- [ key: string]: TaskObject
#
template_path• template_path: string = path.join(process.cwd(), 'template')
template 目录
#
Accessors#
apiHost• get apiHost(): string
Returns: string
• set apiHost(url
: string): void
Parameters:
Name | Type |
---|---|
url | string |
Returns: void
#
apiPrefix• get apiPrefix(): string
Returns: string
• set apiPrefix(url
: string): void
Parameters:
Name | Type |
---|---|
url | string |
Returns: void
#
cacheDir• get cacheDir(): string
Returns: string
• set cacheDir(url
: string): void
Parameters:
Name | Type |
---|---|
url | string |
Returns: void
#
context• get context(): any
Returns: any
#
logPath• get logPath(): string
Returns: string
• set logPath(url
: string): void
Parameters:
Name | Type |
---|---|
url | string |
Returns: void
#
lpmRegistryUrl• get lpmRegistryUrl(): string
Returns: string
• set lpmRegistryUrl(url
: string): void
Parameters:
Name | Type |
---|---|
url | string |
Returns: void
#
registryUrl• get registryUrl(): string
Returns: string
• set registryUrl(url
: string): void
Parameters:
Name | Type |
---|---|
url | string |
Returns: void
#
Methods#
addContext▸ addContext(packageName
: string, context
: object): void
添加指定包的自定义参数
Parameters:
Name | Type | Description |
---|---|---|
packageName | string | lisa lib包名 |
context | object | 自定义参数 |
Returns: void
#
addGlobalContext▸ addGlobalContext(context
: object): void
添加全局的自定义参数
Parameters:
Name | Type | Description |
---|---|---|
context | object | 自定义参数 |
Returns: void
#
configuration▸ configuration(callback
: ConfigFunc): void
程序设置
Parameters:
Name | Type | Description |
---|---|---|
callback | ConfigFunc |
Returns: void
#
errorLog▸ errorLog(stderr
: string): void
log stderr 输出
Parameters:
Name | Type | Description |
---|---|---|
stderr | string | 输出内容 |
Returns: void
#
getContextFromPackageName▸ getContextFromPackageName(packaegName
: string): any
获取包名下面的Context属性
Parameters:
Name | Type | Description |
---|---|---|
packaegName | string | 包名 |
Returns: any
#
gitignore▸ gitignore(path
: string, args
: string[]): void
gitignore 设置git忽略的目录文件
Parameters:
Name | Type | Description |
---|---|---|
path | string | .gitignore 路径 |
args | string[] | 要忽略的目录文件 |
Returns: void
#
log▸ log(stdout
: string): void
log stdout 输出
Parameters:
Name | Type | Description |
---|---|---|
stdout | string | 输出内容 |
Returns: void
#
Object literals#
pipeline#
▪ pipeline: object创建项目时的参数
▪ build: object
desc: string = "打包"
tasks: string[] = ['build:init', 'build:patch', 'build:source', 'build:pre_respak', 'build:respak', 'build:package']
▪ create: object
desc: string = "创建项目"
tasks: string[] = ['create:init', 'create:install']
▪ init: object
desc: string = "项目初始化"
tasks: string[] = ['init:ready', 'init:install']