Skip to content

Commit 0028f18

Browse files
aarondfrancisclaude
andcommitted
Add CLAUDE.md for Claude Code guidance
🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 20845f0 commit 0028f18

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

CLAUDE.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Project Overview
6+
7+
Airdrop is a Laravel package that speeds up deployments by skipping asset compilation when possible. It calculates a hash of build inputs (packages, JS/CSS files, ENV vars, etc.) and reuses previously built assets if the configuration hasn't changed.
8+
9+
Full docs: https://hammerstone.dev/airdrop/docs
10+
11+
## Commands
12+
13+
```bash
14+
# Run tests
15+
vendor/bin/phpunit
16+
17+
# Run a single test
18+
vendor/bin/phpunit --filter test_name
19+
20+
# Code formatting
21+
vendor/bin/pint
22+
23+
# Check formatting without changes
24+
vendor/bin/pint --test
25+
```
26+
27+
## Architecture
28+
29+
**Drivers** (`src/Drivers/`) - Handle storage/retrieval of built assets:
30+
- `BaseDriver` - Abstract base with `download()` and `upload()` methods
31+
- `FilesystemDriver` - Uses Laravel's filesystem (local, S3, etc.)
32+
- `GithubActionsDriver` - Uses GitHub Actions cache
33+
34+
**Triggers** (`src/Triggers/`) - Determine what affects the build hash:
35+
- Implement `TriggerContract::triggerBuildWhenChanged($config)`
36+
- `FileTrigger` - Hashes file contents
37+
- `ConfigTrigger` - Hashes config values
38+
39+
**Commands** (`src/Commands/`):
40+
- `airdrop:download` - Pull cached assets if hash matches
41+
- `airdrop:upload` - Store built assets with current hash
42+
- `airdrop:hash` - Output current hash
43+
- `airdrop:debug` - Debug trigger outputs
44+
- `airdrop:install` - Publish config file
45+
46+
## Code Style
47+
48+
Uses Laravel Pint with the Laravel preset. Key customizations in `pint.json`:
49+
- `concat_space`: one space around concatenation operator
50+
- `trailing_comma_in_multiline`: false

0 commit comments

Comments
 (0)