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!
29 lines (28 loc) • 840 B
TypeScript
export interface VersionInjectorConfig {
packageJson: string;
injectInComments: false | InjectInCommentsConfig;
injectInTags: false | InjectInTagsConfig;
logLevel: LogLevel;
logger: ILogger;
exclude: string[];
}
export interface InjectInTagsConfig {
fileRegexp: RegExp;
tagId: string;
dateFormat: string;
}
export interface InjectInCommentsConfig {
fileRegexp: RegExp;
tag: string;
dateFormat: string;
}
export interface ILogger {
log(...args: any[]): void;
debug(...args: any[]): void;
info(...args: any[]): void;
warn(...args: any[]): void;
error(...args: any[]): void;
}
export declare type LogLevel = 'debug' | 'info' | 'warn' | 'error' | 'log';
export declare type LogNumericValue = 1 | 2 | 3 | 4;
export declare type SupportedFileExtensions = 'js' | 'html' | 'css';