@criticalmanufacturing/dev-i18n-transform
Version:
i18n <--> gettext transform
34 lines (33 loc) • 1 kB
TypeScript
import { File } from "./file";
export declare class Package {
/**
* Gets the package name
*/
readonly name: string;
/**
* Gets the package path (including the package name)
*/
readonly path: string;
private readonly _files;
/**
* Gets all package files
*/
get files(): File[];
/**
* Creates a new Package structure
* @param packagePath Name of the package
*/
constructor(packagePath: string);
/**
* Verify if the given file already exists in the package
* @param file File to check if exists
* @return True if the file exists, false otherwise
*/
hasFile(file: File): boolean;
/**
* Adds a file to the package.
* If the a file with the same with the same identifier already exists in the package, it's merged {@see File.merge} with the existing one.
* @param file File to be added or updated.
*/
addOrUpdateFile(file: File): void;
}