UNPKG

st-bundle

Version:

CLI for watching and bundling SpringType projects.

55 lines (54 loc) 3.13 kB
/// <reference types="node" /> import * as fs from 'fs'; export declare function path2Regex(path: string): RegExp; export declare function matchAll(regex: RegExp, str: string, cb: (matches: any) => void): void; export declare function removeFolder(userPath: any): void; export declare function beautifyBundleName(absPath: string): string; export declare function offsetLines(obj: any, amount: number): any; export declare function isRegExp(input: any): boolean; export declare function createRequireConst(name: string, variable?: string): string; export declare function createRequireConstWithObject(name: string, variable: string, obj?: string): string; export declare function createStringConst(name: string, value: string): string; export declare function createVarString(name: string, value: string): string; export declare function ensurePublicExtension(url: string): string; export declare function parseVersion(version: string): any[]; export declare function replaceExt(npath: string, ext: any): string; export declare function extractFuseBoxPath(homeDir: string, targetPath: string): string; export declare function fileExists(file: string): boolean; export declare function readFile(file: string): string; export declare function readFileAsBuffer(file: string): Buffer; export declare function removeFile(file: string): void; export declare function copyFile(file: string, target: string): Promise<any>; export declare function isObject(obj: any): boolean; export declare function pathJoin(...args: any[]): string; export declare function getExtension(file: string): string; export declare function ensureDir(dir: string): string; export declare function fileStat(file: string): fs.Stats; export declare function makeFuseBoxPath(homeDir: string, absPath: string): string; export declare function measureTime(group?: string): { end: () => any; }; export declare function cleanExistingSourceMappingURL(contents: string): string; export declare function findReplace(str: string, re: RegExp, fn: (args: any) => string): string; export declare function path2RegexPattern(path: string): RegExp; export declare function ensureUserPath(userPath: string, root?: string): string; export declare type Concat = { add(fileName: string | null, content: string | Buffer, sourceMap?: string): void; content: Buffer; sourceMap: string; }; export declare type ConcatModule = { new (generateSourceMap: boolean, outputFileName: string, seperator: string): Concat; }; export declare const Concat: ConcatModule; export declare function createConcat(generateSourceMap: boolean, outputFileName: string, seperator: string): Concat; export declare function ensureAbsolutePath(userPath: string, root: string): string; export declare function getPathRelativeToConfig(props: { fileName?: string; dirName: string; ensureDirExist?: boolean; }): string; export declare function ensureFuseBoxPath(input: string): string; export declare function joinFuseBoxPath(...any: any[]): string; export declare function writeFile(name: string, contents: any): Promise<unknown>; export declare function fastHash(text: string): string;