UNPKG

sol-merger

Version:

Merges all import files into single file.

30 lines (29 loc) 901 B
export interface ImportsAnalyzerResult { importStatement: string; file: string; globalRenameImport: string | null; namedImports: ImportsAnalyzerNamedImportResult[] | null; } export interface ImportsAnalyzerNamedImportResult { name: string; as: string | null; } export declare class ImportsAnalyzer { private contents; static isAllImport(parentImport?: ImportsAnalyzerResult): boolean; static isRenameGlobalImport(parentImport?: ImportsAnalyzerResult): boolean | undefined; constructor(contents: string); /** * Analyzes all the imports of the file */ analyzeImports(): ImportsAnalyzerResult[]; /** * Single import statement to process. Basicly it analizes next things: * * 1. Rename of the global import if any * 2. Named imports if any * 3. Extract filename from import * */ private analyzeImport; }