UNPKG

rollup-plugin-version-injector

Version:

A simple rollup.js plugin to inject your application's version number and/or today's date into your built js, html, and css files!

21 lines (20 loc) 854 B
import { ILogger, SupportedFileExtensions, InjectInTagsConfig, InjectInCommentsConfig } from '../types/interfaces'; export declare class VIInjector { private logger; private codeChanged; private code; constructor(logger: ILogger); getVersion(packagePath: string): string; setCode(code: string): void; isCodeChanged(): boolean; getCode(): string; getFileExtension(fileName: string): SupportedFileExtensions | null; injectIntoTags(config: InjectInTagsConfig | false | undefined, fileName: string, version: string): void; injectIntoComments(config: InjectInCommentsConfig | false | undefined, fileName: string, version: string): void; private replaceVersionInTags; private replaceVersionInComments; private stripTags; private buildTagRegexp; private replaceVersion; private replaceDate; }