forked from projen/projen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreadme.ts
33 lines (30 loc) · 797 Bytes
/
readme.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import { Project } from './project';
import { SampleFile } from './sample-file';
/**
* SampleReadme Properties
*/
export interface SampleReadmeProps {
/**
* The name of the README.md file
*
* @default "README.md"
* @example "readme.md"
*/
readonly filename?: string;
/**
* The contents
* @default "# replace this"
*/
readonly contents?: string;
}
/**
* Represents a README.md sample file.
* You are expected to manage this file after creation.
*
* @param text - The initial contents of the README.md file. Defaults to '# replace this'
*/
export class SampleReadme extends SampleFile {
constructor(project: Project, props?: SampleReadmeProps) {
super(project, props?.filename ?? 'README.md', { contents: props?.contents ?? '# replace this' });
}
}