UNPKG

2 kBTypeScriptView Raw
1import type { FilenamesForPackageFiles, FilenamesForReadmeFiles, DataForReadmeFiles, DataForPackageFiles, EnhancedReadmeData, EnhancedPackageData } from './types.js';
2export * from './types.js';
3/** Projectz, use to merge data files and render meta files. */
4export declare class Projectz {
5 /** The log function to use, first argument being the log level */
6 readonly log: Function;
7 /** The directory to process, defaults to the current working directory*/
8 readonly cwd: string;
9 /** If enabled, then remote updates will be not performed (such as fetching latest backers). */
10 readonly offline: boolean;
11 /**
12 * Resolved absolute paths for the package files.
13 * Should be arranged in the order of merging preference.
14 */
15 protected readonly filenamesForPackageFiles: FilenamesForPackageFiles;
16 /** Resolved data for the package files */
17 protected readonly dataForPackageFiles: DataForPackageFiles;
18 /** Resolved absolute paths for the readme files */
19 protected readonly filenamesForReadmeFiles: FilenamesForReadmeFiles;
20 /** Resolved data for the readme files */
21 protected readonly dataForReadmeFiles: DataForReadmeFiles;
22 /** Configure our instance. */
23 constructor(opts?: Partial<Pick<Projectz, 'cwd' | 'offline' | 'log'>>);
24 /** Use the configuration to compile the project. */
25 compile(): Promise<void>;
26 /** Resolve the paths and metdata for the data and meta files. */
27 protected loadPaths(): Promise<void>;
28 /** Merge and enhance the data for the package files. */
29 protected enhanceDataForPackageFiles(): Promise<EnhancedPackageData>;
30 /** Merge and enhance the metadata from the meta files. */
31 protected enhanceDataForReadmeFiles(data: EnhancedPackageData): Promise<DataForReadmeFiles>;
32 /** Save the data and meta files with our enhancements. */
33 protected save(enhancedPackageData: EnhancedPackageData, enhancedReadmeData: EnhancedReadmeData): Promise<void>;
34}
35//# sourceMappingURL=index.d.ts.map
\No newline at end of file