@mypaas/hcm-cli
Version:
Vant Cli 是一个 Vue 组件库构建工具,通过 Vant Cli 可以快速搭建一套功能完备的 Vue 组件库。
43 lines (42 loc) • 2.19 kB
TypeScript
import { getVantConfig } from './constant';
import { WebpackConfig } from './types';
export declare const EXT_REGEXP: RegExp;
export declare const SFC_REGEXP: RegExp;
export declare const DEMO_REGEXP: RegExp;
export declare const TEST_REGEXP: RegExp;
export declare const ASSET_REGEXP: RegExp;
export declare const STYLE_REGEXP: RegExp;
export declare const SCRIPT_REGEXP: RegExp;
export declare const ENTRY_EXTS: string[];
export declare function removeExt(path: string): string;
export declare function replaceExt(path: string, ext: string): string;
export declare function hasDefaultExport(code: string): boolean;
/**
* 获取忽略组件筛选器, 避免重复加载 config
* @param filterFn
*/
export declare function getIgnoreComponentFilter(filterFn: Function): (params: any) => boolean;
export declare function getComponents(): string[];
export declare function isDir(dir: string): boolean;
export declare function isDemoDir(dir: string): boolean;
export declare function isTestDir(dir: string): boolean;
export declare function isAsset(path: string): boolean;
export declare function isSfc(path: string): boolean;
export declare function isStyle(path: string): boolean;
export declare function isScript(path: string): boolean;
export declare function camelize(str: string): string;
export declare function pascalize(str: string): string;
export declare function decamelize(str: string, sep?: string): string;
export declare function normalizePath(path: string): string;
export declare function getWebpackConfig(defaultConfig: WebpackConfig): object;
export declare type ModuleEnv = 'esmodule' | 'commonjs';
export declare type NodeEnv = 'production' | 'development' | 'test';
export declare type BuildTarget = 'site' | 'package';
export declare type PostcssREM = 'on' | 'off';
export declare function setModuleEnv(value: ModuleEnv): void;
export declare function setNodeEnv(value: NodeEnv): void;
export declare function setBuildTarget(value: BuildTarget): void;
export declare function isDev(): boolean;
export declare function setPostCSSREM(value: boolean): void;
export declare function smartOutputFile(filePath: string, content: string): void;
export { getVantConfig };