@render-ae86/ae86-package
v1.2.0
Published
用于指定位置下载第三方依赖包到本地
Downloads
1
Readme
@render-ae86/ae86-package
用于指定位置下载第三方依赖包到本地
Usage
const Package = require('@render-ae86/ae86-package');
// pkgName npm包名
// storePath 本地存储路径
const package = new Package({pkgName,storePath})
// 类型定义如下
interface Options {
version?: string;
pkgName: string;
storePath?: string;
pkgPath?: string;
}
declare class Package {
version?: string;
pkgName: string;
storePath?: string;
pkgPath?: string;
constructor(options?: Options);
prepare(): Promise<void>;
getNpmPkgLatestVersion(): Promise<string>;
install(version?: string): Promise<any>;
canIInstall(): Promise<boolean>;
isLocalPkgExist(version: string): Promise<boolean>;
update(): Promise<void>;
deleteOldVersionPkg(): Promise<void>;
localPkgPath(version: string): string;
getPkgCachePath(): Promise<string>;
}
export = Package;