Compare commits
3
Commits
695742019d
...
7ca0813567
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7ca0813567 | ||
|
|
73132fc2d0 | ||
|
|
0c01260da2 |
No files matched your search
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
Copier template for a SvelteKit frontend, either as a `frontend/` part next to other parts or alone at the root of the project (`layout`): SvelteKit on Bun with Tailwind v4, ultracite (biome) and optional shadcn-svelte, served by a Bun server with SSR, as a static SPA behind `serve.ts`, or as a static SPA that the backend api serves from `frontend/build`.
|
Copier template for a SvelteKit frontend, either as a `frontend/` part next to other parts or alone at the root of the project (`layout`): SvelteKit on Bun with Tailwind v4, ultracite (biome) and optional shadcn-svelte, served by a Bun server with SSR, as a static SPA behind `serve.ts`, or as a static SPA that the backend api serves from `frontend/build`.
|
||||||
|
|
||||||
Ships `frontend/docker-compose.yml` with root-relative paths and profiles per service, `docker-compose.override.yml.example` (the `caddy` network aliases, copied by `make env`), a `Makefile` with `fmt`, `check`, `build` and `dev`, `.env.example`, `CLAUDE.md`, `.claude/rules` for Svelte and ultracite, the Svelte MCP server and `.impeccable/` scaffolding. Applied on top of the `infra` template, `layout: parts` or `layout: single` respectively.
|
Ships `frontend/docker-compose.yml` with root-relative paths and profiles per service, `docker-compose.override.yml.example` (the `caddy` network aliases, copied by `make env`), a `Makefile` with `fmt`, `check`, `build` and `dev`, `.env.example`, `CLAUDE.md`, `.claude/rules` for Svelte and ultracite. The Svelte MCP server comes from `infra`. Applied on top of the `infra` template, `layout: parts` or `layout: single` respectively.
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
copier copy --trust -d project_name="My Thing" -d serve=bun <this-repo> <dest>
|
copier copy --trust -d project_name="My Thing" -d serve=bun <this-repo> <dest>
|
||||||
|
|||||||
@@ -37,11 +37,6 @@ ui_library:
|
|||||||
shadcn-svelte: shadcn
|
shadcn-svelte: shadcn
|
||||||
default: none
|
default: none
|
||||||
|
|
||||||
include_impeccable:
|
|
||||||
type: bool
|
|
||||||
help: .impeccable/ scaffolding for the impeccable skill
|
|
||||||
default: true
|
|
||||||
|
|
||||||
install_deps:
|
install_deps:
|
||||||
type: bool
|
type: bool
|
||||||
help: bun install after generation
|
help: bun install after generation
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
{
|
|
||||||
"mcpServers": {
|
|
||||||
"svelte": {
|
|
||||||
"type": "http",
|
|
||||||
"url": "https://mcp.svelte.dev/mcp"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
config.local.json
|
|
||||||
hook.cache.json
|
|
||||||
hook.pending.json
|
|
||||||
@@ -28,8 +28,15 @@ dev:
|
|||||||
bun run dev
|
bun run dev
|
||||||
{% if layout == 'root' %}
|
{% if layout == 'root' %}
|
||||||
env:
|
env:
|
||||||
@test -f .env || cp .env.example .env
|
@fresh=; test -f .env || { cp .env.example .env; fresh=1; }; \
|
||||||
@test -f docker-compose.override.yml || cp docker-compose.override.yml.example docker-compose.override.yml
|
if ! test -f docker-compose.override.yml; then \
|
||||||
|
cp docker-compose.override.yml.example docker-compose.override.yml; \
|
||||||
|
for port in $$(sed -n 's/.*127\.0\.0\.1:\([0-9]*\):.*/\1/p' docker-compose.override.yml | sort -u); do \
|
||||||
|
random=$$((20000 + $$(od -An -N2 -tu2 /dev/urandom) % 40000)); \
|
||||||
|
sed "s/127\.0\.0\.1:$$port:/127.0.0.1:$$random:/" docker-compose.override.yml > docker-compose.override.yml.tmp && mv docker-compose.override.yml.tmp docker-compose.override.yml; \
|
||||||
|
test -z "$$fresh" || { sed "s|localhost:$$port/|localhost:$$random/|" .env > .env.tmp && mv .env.tmp .env; }; \
|
||||||
|
done; \
|
||||||
|
fi
|
||||||
|
|
||||||
recreate:
|
recreate:
|
||||||
$(COMPOSE) up -d --force-recreate
|
$(COMPOSE) up -d --force-recreate
|
||||||
|
|||||||
@@ -2,13 +2,7 @@
|
|||||||
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
|
"$schema": "./node_modules/@biomejs/biome/configuration_schema.json",
|
||||||
"extends": ["ultracite/biome/core", "ultracite/biome/svelte"],
|
"extends": ["ultracite/biome/core", "ultracite/biome/svelte"],
|
||||||
"files": {
|
"files": {
|
||||||
"includes": [
|
"includes": ["!.claude", "!.svelte-kit", "!build", "!.mcp.json"]
|
||||||
"!.claude",
|
|
||||||
"!.svelte-kit",
|
|
||||||
"!build",
|
|
||||||
"!.mcp.json",
|
|
||||||
"!.impeccable"
|
|
||||||
]
|
|
||||||
},
|
},
|
||||||
"javascript": { "globals": ["Bun"] },
|
"javascript": { "globals": ["Bun"] },
|
||||||
"overrides": [
|
"overrides": [
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ services:
|
|||||||
caddy:
|
caddy:
|
||||||
aliases:
|
aliases:
|
||||||
- {{ dash }}-frontend
|
- {{ dash }}-frontend
|
||||||
|
# ports:
|
||||||
|
# - "127.0.0.1:3000:3000"
|
||||||
|
|
||||||
{% endif %} frontend-dev:
|
{% endif %} frontend-dev:
|
||||||
networks:
|
networks:
|
||||||
@@ -13,6 +15,8 @@ services:
|
|||||||
caddy:
|
caddy:
|
||||||
aliases:
|
aliases:
|
||||||
- {{ dash }}-frontend
|
- {{ dash }}-frontend
|
||||||
|
# ports:
|
||||||
|
# - "127.0.0.1:3000:3000"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
caddy:
|
caddy:
|
||||||
|
|||||||
@@ -1,27 +1,35 @@
|
|||||||
{
|
{
|
||||||
"name": "{{ project_slug }}",
|
"name": "{{ project_slug }}",
|
||||||
"type": "module",
|
|
||||||
"private": true,
|
|
||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
|
"private": true,
|
||||||
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview",
|
|
||||||
"prepare": "svelte-kit sync || echo ''",
|
|
||||||
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
|
||||||
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
|
||||||
|
"dev": "vite dev",
|
||||||
|
"fix": "ultracite fix",
|
||||||
"lint": "ultracite check",
|
"lint": "ultracite check",
|
||||||
"fix": "ultracite fix"
|
"prepare": "svelte-kit sync || echo ''",
|
||||||
|
"preview": "vite preview"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@biomejs/biome": "2.5.2",
|
{%- set deps = {
|
||||||
|
"@biomejs/biome": "2.5.13",
|
||||||
"@sveltejs/kit": "^2.63.0",
|
"@sveltejs/kit": "^2.63.0",
|
||||||
"@sveltejs/vite-plugin-svelte": "^7.1.2",
|
"@sveltejs/vite-plugin-svelte": "^7.1.2",
|
||||||
"@tailwindcss/vite": "^4.3.0",
|
"@tailwindcss/vite": "^4.3.0",
|
||||||
"@types/bun": "^1.3.0",
|
"@types/bun": "^1.3.0",
|
||||||
{% if frontend_adapter == 'bun' %} "svelte-adapter-bun": "^1.0.1",
|
"svelte": "^5.56.1",
|
||||||
{% else %} "@sveltejs/adapter-static": "^3.0.10",
|
"svelte-check": "^4.6.0",
|
||||||
{% endif %}{% if ui_library == 'shadcn' %} "@internationalized/date": "^3.12.0",
|
"tailwindcss": "^4.3.0",
|
||||||
|
"typescript": "^6.0.3",
|
||||||
|
"ultracite": "7.12.0",
|
||||||
|
"vite": "^8.0.16",
|
||||||
|
} -%}
|
||||||
|
{%- if frontend_adapter == 'bun' %}{% set _ = deps.update({"svelte-adapter-bun": "^1.0.1"}) %}{% else %}{% set _ = deps.update({"@sveltejs/adapter-static": "^3.0.10"}) %}{% endif -%}
|
||||||
|
{%- if ui_library == 'shadcn' %}{% set _ = deps.update({
|
||||||
|
"@internationalized/date": "^3.12.0",
|
||||||
"@lucide/svelte": "^1.23.0",
|
"@lucide/svelte": "^1.23.0",
|
||||||
"bits-ui": "^2.16.3",
|
"bits-ui": "^2.16.3",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
@@ -31,11 +39,9 @@
|
|||||||
"tailwind-merge": "^3.5.0",
|
"tailwind-merge": "^3.5.0",
|
||||||
"tailwind-variants": "^3.2.2",
|
"tailwind-variants": "^3.2.2",
|
||||||
"tw-animate-css": "^1.4.0",
|
"tw-animate-css": "^1.4.0",
|
||||||
{% endif %} "svelte": "^5.56.1",
|
}) %}{% endif %}
|
||||||
"svelte-check": "^4.6.0",
|
{%- for name, version in deps | dictsort %}
|
||||||
"tailwindcss": "^4.3.0",
|
"{{ name }}": "{{ version }}"{{ "," if not loop.last }}
|
||||||
"typescript": "^6.0.3",
|
{%- endfor %}
|
||||||
"ultracite": "7.9.0",
|
|
||||||
"vite": "^8.0.16"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -16,8 +16,3 @@ node_modules
|
|||||||
# Vite
|
# Vite
|
||||||
vite.config.js.timestamp-*
|
vite.config.js.timestamp-*
|
||||||
vite.config.ts.timestamp-*
|
vite.config.ts.timestamp-*
|
||||||
|
|
||||||
# Impeccable
|
|
||||||
**/.impeccable/config.local.json
|
|
||||||
**/.impeccable/hook.cache.json
|
|
||||||
**/.impeccable/hook.pending.json
|
|
||||||
Reference in new issue
Block a user