UNPKG

1.76 kBTypeScriptView Raw
1import type {
2 FilenamesForPackageFiles,
3 FilenamesForReadmeFiles,
4 DataForReadmeFiles,
5 DataForPackageFiles,
6 EnhancedPackagesData,
7 EnhancedReadmesData,
8} from './types.js'
9interface Options {
10 /** the directory that we wish to do our work on, defaults to `process.cwd()` */
11 cwd?: string
12 /** the log function to use, first argument being the log level */
13 log?: Function
14}
15export declare class Projectz {
16 /** our log function to use (logLevel, ...messages) */
17 protected readonly log: Function
18 /** the current working directory (the path) that projectz is working on */
19 protected readonly cwd: string
20 /**
21 * The absolute paths for all the package files.
22 * Should be arranged in the order of merging preference.
23 */
24 protected readonly filenamesForPackageFiles: FilenamesForPackageFiles
25 /** the data for each of our package files */
26 protected readonly dataForPackageFiles: DataForPackageFiles
27 /** the absolute paths for all the meta files */
28 protected readonly filenamesForReadmeFiles: FilenamesForReadmeFiles
29 /** the data for each of our readme files */
30 protected readonly dataForReadmeFiles: DataForReadmeFiles
31 constructor(opts: Options)
32 /** Compile the project */
33 compile(): Promise<void>
34 /** Load in the paths we have specified */
35 protected loadPaths(): Promise<void>
36 /** Merge and enhance the packages data */
37 protected enhancePackagesData(): Promise<EnhancedPackagesData>
38 /** Merge and enhance the readmes data */
39 protected enhanceReadmesData(
40 data: EnhancedPackagesData
41 ): Promise<DataForReadmeFiles>
42 /** Save the data we've loaded into the files */
43 protected save(
44 enhancedPackagesData: EnhancedPackagesData,
45 enhancedReadmesData: EnhancedReadmesData
46 ): Promise<void>
47}
48export {}
49//# sourceMappingURL=index.d.ts.map