Skip to content

Commit 0949ee6

Browse files
committed
docs: add development setup instructions
- Add Development Setup section to README.md with prerequisites - Update setup.sh to install pre-commit hooks automatically - Add npm tool checks (markdownlint, mermaid-cli) to setup.sh - Simplify next steps in setup.sh output
1 parent bc0ca0f commit 0949ee6

File tree

2 files changed

+37
-7
lines changed

2 files changed

+37
-7
lines changed

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,22 @@ AI-assisted development patterns. Each pattern is standalone - adopt what you ne
1919

2020
See [Quickstart](docs/quickstart.md) for pattern overview and adoption guidance.
2121

22+
## Development Setup
23+
24+
```bash
25+
git clone https://github.com/ambient-code/reference.git
26+
cd reference
27+
./scripts/setup.sh
28+
source .venv/bin/activate
29+
pre-commit install
30+
```
31+
32+
**Prerequisites**: Python 3.11+, Node.js (for markdownlint and mermaid-cli)
33+
34+
```bash
35+
npm install -g markdownlint-cli @mermaid-js/mermaid-cli
36+
```
37+
2238
## Repository Contents
2339

2440
```text

scripts/setup.sh

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,18 +27,32 @@ fi
2727
echo "Installing documentation dependencies..."
2828
uv pip install -r requirements-dev.txt
2929

30-
# Verify installation
31-
echo "Verifying installation..."
32-
echo "✓ Documentation tooling installed"
30+
# Install pre-commit hooks
31+
echo "Installing pre-commit hooks..."
32+
.venv/bin/pre-commit install
3333

34+
# Check for npm tools
3435
echo ""
35-
echo "Setup complete! 🎉"
36+
echo "Checking npm tools..."
37+
if command -v markdownlint &> /dev/null; then
38+
echo "✓ markdownlint installed"
39+
else
40+
echo "⚠ markdownlint not found - install with: npm install -g markdownlint-cli"
41+
fi
42+
43+
if command -v mmdc &> /dev/null; then
44+
echo "✓ mermaid-cli installed"
45+
else
46+
echo "⚠ mermaid-cli not found - install with: npm install -g @mermaid-js/mermaid-cli"
47+
fi
48+
49+
echo ""
50+
echo "Setup complete!"
3651
echo ""
3752
echo "Next steps:"
3853
echo " 1. Activate virtual environment: source .venv/bin/activate"
39-
echo " 2. Explore documentation: cat docs/quickstart.md"
40-
echo " 3. Validate Mermaid diagrams: ./scripts/validate-mermaid.sh"
41-
echo " 4. Lint markdown: markdownlint docs/**/*.md --fix"
54+
echo " 2. Install npm tools (if missing): npm install -g markdownlint-cli @mermaid-js/mermaid-cli"
55+
echo " 3. Validate docs: pre-commit run --all-files"
4256
echo ""
4357
echo "For a working application demo, see:"
4458
echo " https://github.com/ambient-code/demo-fastapi"

0 commit comments

Comments
 (0)