You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
import { IApi } from '@umijs/types' ;
/**
* 判断一个路径是否为空
* 只要有一个文件就算非空
* @param {*} path
*/
export declare const isEmptyFolder : ( path : any ) = > boolean ;
export declare function getNameFromPkg ( pkg : any ) : string ;
/**
* 删除重复依赖, projectDeps 中的依赖从 blockDeps 中删除
* @param {*} blockDeps
* @param {*} projectDeps
*/
export declare function filterDependenciesRepeat ( blockDeps : any , projectDeps : any ) : { } ;
export declare function getAllBlockDependencies ( rootDir : any , pkg : any ) : { } ;
/**
* 检查依赖项之间的冲突
* @param {*}} blockPkgDeps
* @param {*} projectPkgDeps
* @param {*} blockPkgDevDeps
* @param {*} projectPkgAllDeps
*/
export declare function dependenciesConflictCheck ( blockPkgDeps ? : { } , projectPkgDeps ? : { } , blockPkgDevDeps ? : { } , projectPkgAllDeps ? : { } ) : {
conflicts : any [ ] ;
lacks : any [ ] ;
devConflicts : any [ ] ;
devLacks : any [ ] ;
} ;
/**
* 获取 mock 的依赖
* @param {*} mockContent
* @param {*} blockPkg
*/
export declare function getMockDependencies ( mockContent : any , blockPkg : any ) : { } ;
export declare function parseContentToSingular ( content : any ) : any ;
export declare function getSingularName ( name : any ) : any ;
export declare const getBlockGenerator : ( api : IApi ) = > {
new ( { args , name } : {
args : any ;
name : any ;
} ) : {
isTypeScript : any ;
sourcePath : any ;
dryRun : any ;
path : any ;
blockFolderPath : any ;
routePath : any ;
blockName : any ;
isPageBlock : any ;
execution : any ;
needCreateNewRoute : any ;
blockFolderName : any ;
entryPath : any ;
routes : any ;
on : any ;
prompt : any ;
fs : any ;
store : any ;
blockType : 'block' | 'template' ;
addType : 'git' | 'files' ;
files : string [ ] ;
run ( ) : Promise < any > ;
gitBlockWriting ( ) : Promise < void > ;
filesBlockWriting ( ) : Promise < void > ;
writing ( ) : Promise < void > ;
cwd : string ;
args : {
[ argName : string ] : unknown ;
_ : string [ ] ;
$0 : string ;
} ;
copyTpl ( opts : {
templatePath : string ;
target : string ;
context : object ;
} ) : void ;
copyDirectory ( opts : {
path : string ;
context : object ;
target : string ;
} ) : void ;
} ;
} ;