What if tooling was done with 1 command?
Craft CMS 4 infused with Vite, TypeScript and WindiCSS.
Lightning fast development, HMR and a production ready build process.
bash <(curl -s https://raw.githubusercontent.com/szenario-fordesigners/craft-vite-starter/main/init.sh)
mkdir my-project && cd my-project
ddev config --project-type=craftcms --docroot=web --create-docroot
ddev composer create -y szenario-fordesigners/craft-vite-starter
make install
make dev
- DDEV
- Unix-based OS (MacOS, Linux)
Use WSL2 and follow the instructions for Unix-based OS. DDEV Documentation is a great starting point.
make install
- patches the DDEV craft config and installs Craft CMS. Should only be used as a first time setup.make dev
- starts the development servermake build
- bundles the assets for production
ddev yarn
- for managing frontend packagesddev composer
- for managing backend packagesddev craft
- exposes the Craft CLI
To use Critical CSS, you need to manually add the pages that should be pre-rendered to the criticalPages
array in vite.config.ts
. The pages will be pre-rendered when building and the generated CSS will be inlined in the HTML.
This repository is based on the official Craft CMS 4 starter template.
Thanks to Andrew Welch for the great craft-vite plugin!
Simon Wesp 💻 |
Thomas Bendl 💻 |
Esteban Castro 💻 |