UNPKG

@sinclair/hammer

Version:

Build Tool for Browser and Node Applications

63 lines (62 loc) 1.75 kB
export declare type AssetType = 'html' | 'typescript' | 'javascript' | 'css' | 'file'; export declare type Asset = Html | JavaScript | TypeScript | Css | File; export declare type Html = { type: 'html'; timestamp: number; sourcePath: string; targetPath: string; content: string; }; export declare type JavaScript = { type: 'javascript'; timestamp: number; sourcePath: string; targetPath: string; esm: boolean; }; export declare type TypeScript = { type: 'typescript'; timestamp: number; sourcePath: string; targetPath: string; esm: boolean; }; export declare type Css = { type: 'css'; timestamp: number; sourcePath: string; targetPath: string; }; export declare type File = { type: 'file'; timestamp: number; sourcePath: string; targetPath: string; }; export declare class Resolver { private readonly sourcePaths; constructor(); private getTimestamp; private getSourcePathType; private esmExtension; private mappedExtension; private changeExtension; private getSourceDirectory; private getSourcePathFromAbsolute; private getSourcePathFromRelative; private getTargetPathFromAbsolute; private getTargetPathFromRelative; private resolveDirectory; private getHtmlTags; private getHtmlContentTargetName; private getHtmlContent; private resolveHtml; private resolveFile; private resolveTypeScript; private resolveJavaScript; private resolveCss; private resolveUnknown; private resolveAny; resolve(sourcePaths: string[], targetDirectory: string): Generator<Asset>; } export declare function resolve(sourcePaths: string[], targetDirectory: string): Generator<Asset>;