Skip to content

Commit ff39d71

Browse files
Add README.md to generated template (#171)
* Add README.md to generated template * Clean up README.md Co-authored-by: Miroma <its.miroma@proton.me> --------- Co-authored-by: Miroma <its.miroma@proton.me>
1 parent de65bf0 commit ff39d71

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

scripts/src/lib/template/git.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
import type { ComputedConfiguration, TemplateWriter } from "./template";
2+
import { renderTemplate } from './eta';
23

34
import gitattributes from './templates/git/gitattributes?raw';
45
import gitignore from './templates/git/gitignore?raw';
56
import workflow from './templates/git/workflow.yml?raw';
67
import license from './templates/git/LICENSE?raw';
8+
import readme from './templates/git/README.md.eta?raw';
79

8-
export async function addGitFiles(writer: TemplateWriter, _config: ComputedConfiguration) {
10+
export async function addGitFiles(writer: TemplateWriter, config: ComputedConfiguration) {
911
await writer.write('.gitattributes', gitattributes);
1012
await writer.write('.gitignore', gitignore);
1113
await writer.write('.github/workflows/build.yml', workflow);
1214
await writer.write('LICENSE', license);
15+
await writer.write('README.md', renderTemplate(readme, config));
1316
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# <%= it.projectName %>
2+
3+
## Setup
4+
5+
For setup instructions, please see the [Fabric Documentation page](https://docs.fabricmc.net/develop/getting-started/creating-a-project#setting-up) related to the IDE that you are using.
6+
7+
## License
8+
9+
This template is available under the CC0 license. Feel free to learn from it and incorporate it in your own projects.

0 commit comments

Comments
 (0)