Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
* text=auto
* text=auto

*.md text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.json text eol=lf
*.md text eol=lf
*.xml text eol=lf
*.yml text eol=lf
*.yaml text eol=lf
*.json text eol=lf

pnpm-lock.yaml text eol=lf linguist-generated
pnpm-lock.yaml text eol=lf linguist-generated

.run/* linguist-generated
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.idea/
.vscode/*
!.vscode/extensions.json
!.vscode/launch.json
!.vscode/tasks.json

.claude/worktrees/

Expand Down
4 changes: 3 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ pnpm-lock.yaml

.idea/
.vscode/*
.vscode/extensions.json
!.vscode/extensions.json
!.vscode/launch.json
!.vscode/tasks.json
12 changes: 12 additions & 0 deletions .run/format-check.run.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .run/format.run.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .run/lint-md.run.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"recommendations": ["esbenp.prettier-vscode", "editorconfig.editorconfig", "davidanson.vscode-markdownlint"]
}
4 changes: 4 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"version": "0.2.0",
"configurations": []
}
26 changes: 26 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"version": "2.0.0",
"tasks": [
{
"type": "npm",
"script": "format",
"label": "format",
"detail": "prettier -w .",
"problemMatcher": []
},
{
"type": "npm",
"script": "format-check",
"label": "format-check",
"detail": "prettier -l .",
"problemMatcher": []
},
{
"type": "npm",
"script": "lint-md",
"label": "lint-md",
"detail": "markdownlint-cli2",
"problemMatcher": []
}
]
}
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Template repository for bootstrapping new `dnd-mapp` repositories, with shared tooling and CI pre-configured.

## Prerequisites

- [mise](https://mise.jdx.dev/) (recommended): manages the Node.js and pnpm versions this repo pins in `package.json`'s `devEngines` field. Run `mise install` after installing it to pick up matching versions automatically.

## Installation

Click **Use this template** on GitHub to create a new repository from this one. In the new repository, install dependencies and set up the Husky git hooks:
Expand All @@ -12,6 +16,21 @@ pnpm install

Then update `package.json`'s `name` and `description`, and this README, to match the new repository.

## Editor setup

Configure your editor to run Prettier on save, so files match this repo's `.prettierrc.json` without needing `pnpm format` before every commit.

- **VS Code**: install the recommended [Prettier extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) (VS Code prompts for it automatically via `.vscode/extensions.json`), then add to your `settings.json`:

```json
{
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
```

- **WebStorm**: open Settings → Languages & Frameworks → JavaScript → Prettier, and check **Run on save**. WebStorm auto-detects the local `prettier` package and this repo's config.

## Usage

```bash
Expand Down