1.0.2 • Published 9 months ago

@es-pkg/utils v1.0.2

Weekly downloads
-
License
ISC
Repository
github
Last release
9 months ago

@es-pkg/utils

gulp node执行

NPM Version  NPM Version  unpacked size  Author

📦 Installation

npm install @es-pkg/utils

🏠 Exports

参数类型
🎗️autoUpgradeFunctions
🎗️compareFunctions
🎗️errorFunctions
🎗️getValidPkgNameFunctions
🎗️infoFunctions
🎗️isDirectoryFunctions
🎗️isValidHttpFunctions
🎗️logFunctions
🎗️removeFunctions
🎗️runFunctions
🎗️stepFunctions
🎗️successFunctions
🎗️titleCaseFunctions
🎗️warnFunctions

🎗️Functions

autoUpgrade

  • autoUpgrade(str:string): string

compare

  • 版本号比较大小

  • compare(v1:string, v2:string): number

error

  • error(content:string, ...rest:any[]): void

getValidPkgName

  • getValidPkgName(str:string): string

info

  • info(content:string, ...rest:any[]): void

isDirectory

  • isDirectory(path:string): boolean

isValidHttp

  • isValidHttp(url:string): boolean

log

  • log(content:string, ...rest:any[]): void
参数类型说明默认值
debug: typeof log
error: ((content:string, ...rest:any[]) => void)
info: ((content:string, ...rest:any[]) => void)
success: ((content:string, ...rest:any[]) => void)
warn: ((content:string, ...rest:any[]) => void)

remove

  • 删除文件或者文件夹

  • remove(url:string, folders?:boolean): Promise<void>

run

  • run(bin:string, args:string[], opts?:Options<string>): Promise<ExecaReturnValue<string>>

step

  • step(msg:string): void

success

  • success(content:string, ...rest:any[]): void

titleCase

  • titleCase(str:string): string

warn

  • warn(content:string, ...rest:any[]): void
1.0.2

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago