UNPKG

vite-uni-dev-tool

Version:

vite-uni-dev-tool, debug, uni-app, 一处编写,到处调试

99 lines 2.75 kB
export declare const regScript: RegExp; export declare function findInsertionIndex(lines: string[], condition: (p: string) => boolean): number; export declare function getContentType(filePath: string): string; export declare function getLocalIPs(): string[]; export declare function hasImportVue(str: string): boolean; export declare function hasImportOnLaunch(str: string): boolean; export declare function hasImportOnExit(str: string): boolean; export declare function hasImportCurrentInstance(str: string): boolean; export declare function hasImportConsole(str: string): boolean; export declare function hasImportDevToolEventBus(str: string): boolean; export declare function hasUseConsole(str: string): boolean; export declare function hasUseDevToolEventBus(str: string): boolean; export declare function hasLangTS(code: string): boolean; export declare function hasLangJS(code: string): boolean; export declare function hasSetup(code: string): boolean; /** * 解析栈信息 * * @export * @param {string} stack * @return {*} */ export declare function parseStock(stack: string): { info: string; path: string; row: number; col: number; }; /** * 在字符串中获取url * * @export * @param {string} text * @return {*} */ export declare function extractUrl(text: string): string; /** * 在字符串中获取路径 * * @export * @param {string} text * @return {*} */ export declare function extractPath(text: string): string; /** * 获取文件内的行内sourcemap * * @export * @param {string} text * @return {*} */ export declare function extractSourceMap(text: string): string; /** * 解析url中的参数 * * @export * @param {string} queryString * @return {*} */ export declare function parseQueryString(queryString: string): any; /** * 获取 template 中的内容 * * @export * @param {string} code * @return {*} */ export declare function getTemplateContent(code: string): string; /** * 检查路径中是否包含指定的目录或文件名 * * @export * @param {string} path 路径 * @param {string[]} dirs 待检查的目录或文件名 * @return {*} */ export declare function hasDirOrFile(path: string, dirs: string[]): boolean; /** * 判断是否是 App.vue 文件 * * @param {string} id * @return {*} */ export declare const isAppVue: (id: string) => boolean; /** * 判断是否是 main.ts|js 文件 * * @param {string} id * @return {*} */ export declare const isMainFile: (id: string) => boolean; /** * 判断是否是 .vue 文件 * * @param {string} id * @return {*} */ export declare const isVueFile: (id: string) => boolean; //# sourceMappingURL=index.d.ts.map