You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Open http://localhost:5173
40
45
```
41
46
42
47
### Available Scripts
43
48
44
-
-`npm run dev` - Start development server
45
-
-`npm run build` - Build for production
46
-
-`npm run preview` - Preview production build
47
-
-`npm run check` - Run Svelte type checking
48
-
-`npm run format` - Format code with Prettier
49
-
-`npm run lint` - Check code formatting
49
+
| Command | Description |
50
+
|---------|-------------|
51
+
|`bun run dev` / `npm run dev`| Start development server with hot reload |
52
+
|`bun run build` / `npm run build`| Build for production |
53
+
|`bun run preview` / `npm run preview`| Preview production build locally |
54
+
|`bun run check` / `npm run check`| Run Svelte type checking |
55
+
|`bun run check:watch` / `npm run check:watch`| Run type checking in watch mode |
56
+
|`bun run format` / `npm run format`| Format code with Prettier |
57
+
|`bun run lint` / `npm run lint`| Check code formatting |
50
58
51
59
## Project Structure
52
60
@@ -74,14 +82,88 @@ www/
74
82
75
83
```bash
76
84
# Create production build
77
-
npm run build
85
+
bun run build # Using Bun
86
+
# or
87
+
npm run build # Using npm
78
88
79
89
# Test the production build locally
80
-
npm run preview
90
+
bun run preview # Using Bun
91
+
# or
92
+
npm run preview # Using npm
81
93
```
82
94
83
95
The built files will be in `.svelte-kit/output/`.
84
96
97
+
## Contributing
98
+
99
+
We welcome contributions to the Foundry Local website! Here's how to get started:
100
+
101
+
### Development Workflow
102
+
103
+
1.**Install dependencies**
104
+
```bash
105
+
bun install # Using Bun (recommended)
106
+
# or
107
+
npm install # Using npm
108
+
```
109
+
110
+
2.**Make your changes**
111
+
- Edit components in `src/lib/components/`
112
+
- Update routes in `src/routes/`
113
+
- Modify styles in `src/app.css` or component files
114
+
115
+
3.**Format your code**
116
+
```bash
117
+
bun run format # Auto-format with Prettier
118
+
# or
119
+
npm run format
120
+
```
121
+
122
+
4.**Run type checking**
123
+
```bash
124
+
bun run check # Verify TypeScript types
125
+
# or
126
+
npm run check
127
+
```
128
+
129
+
5.**Test locally**
130
+
```bash
131
+
bun run dev # Start dev server
132
+
# or
133
+
npm run dev
134
+
```
135
+
136
+
6.**Build and preview**
137
+
```bash
138
+
bun run build && bun run preview
139
+
# or
140
+
npm run build && npm run preview
141
+
```
142
+
143
+
### Code Quality
144
+
145
+
-**Formatting**: Code is formatted with Prettier using the following settings:
146
+
- Tabs for indentation
147
+
- Single quotes
148
+
- No trailing commas
149
+
- 100 character line width
150
+
- Svelte-specific formatting via `prettier-plugin-svelte`
151
+
152
+
-**Type Safety**: All code must pass TypeScript type checking. Run `bun run check` before committing.
153
+
154
+
-**Linting**: Code formatting is enforced via `bun run lint`. Run `bun run format` to auto-fix issues.
155
+
156
+
### Best Practices
157
+
158
+
- Always run `bun run format` before committing to ensure consistent code style
159
+
- Run `bun run check` to catch type errors early
160
+
- Test your changes in both development and production builds for significant features
161
+
- Preview production builds locally to verify optimizations work correctly
162
+
163
+
### Contributor License Agreement
164
+
165
+
This project requires contributors to sign a Contributor License Agreement (CLA). When you submit a pull request, a CLA bot will guide you through the process. For more details, see the [CONTRIBUTING.md](../CONTRIBUTING.md) file in the repository root.
166
+
85
167
## Deployment
86
168
87
169
This site is configured to deploy automatically to Vercel using `@sveltejs/adapter-auto`. Push to the main branch to trigger a deployment.
0 commit comments