Files

67 lines
1.4 KiB
YAML

_subdirectory: template
_templates_suffix: .jinja
_answers_file: .copier/frontend.yml
_envops:
keep_trailing_newline: true
project_name:
type: str
help: Project name
project_slug:
type: str
help: Package name, snake_case
default: "{{ project_name | lower | replace(' ', '_') | replace('-', '_') | replace('.', '_') }}"
layout:
type: str
help: Where the frontend lives
choices:
In frontend/ next to other parts: part
At the root of the project: root
default: part
serve:
type: str
help: How the frontend is served
choices:
Bun server with SSR (svelte-adapter-bun): bun
Static SPA behind serve.ts (adapter-static): static
Static SPA served by the backend api: api
default: bun
ui_library:
type: str
choices:
none (Tailwind v4): none
shadcn-svelte: shadcn
default: none
include_impeccable:
type: bool
help: .impeccable/ scaffolding for the impeccable skill
default: true
install_deps:
type: bool
help: bun install after generation
default: true
frontend_adapter:
type: str
when: false
default: "{{ 'bun' if serve == 'bun' else 'static' }}"
part_dir:
type: str
when: false
default: "{{ 'frontend' if layout == 'part' else '.' }}"
prefix:
type: str
when: false
default: "{{ 'frontend/' if layout == 'part' else '' }}"
_tasks:
- "{% if _copier_operation == 'copy' and install_deps %}sh -c 'cd {{ part_dir }} && bun install'{% else %}true{% endif %}"