My intent is that the setup
command can be broken into sub tasks that can handle different the parts of the project setup:
-
DDEV:
- Check if ddev is installed in the system
- Check if
.ddev
existis in the project root, and if it doesn't:- Copy
.boilerplate/ddev
to .ddev - Prompt for the
project-name
- Run
ddev config --project-name=<project-name>
with the project name - Run
ddev start
- Copy
-
CMS:
- Check if
cms
directory exists in the project root, and if it doesn't:- Copy
.boilerplate/cms
tocms
- Copy cms/example.env to cms/.env
- Copy
- Check if DDEV is running, and if it isn't:
- Start DDEV
- Check if Craft is already installed, and if it isn't:
- Install composer dependencies using DDEV
- Install Craft using DDEV
- Install plugins using DDEV
- Check if
-
Frontend:
- Check if
src
directory exists in the project root, and if it doesn't:- Copy
.boilerplate/src
tosrc
- Copy
- Check and copy each file in
.boilerplate/devtools
directory that doesn't exist to the project root - Check if DDEV is running, and if it isn't:
- Start DDEV
- Check if
node_modules
exist at the root of the project, and if it doesn't:- Install npm dependencies using DDEV
- Check if
ddev craft install/craft --interactive=0 --email="$(ADMIN_USERNAME)" --language="en-US" --password="$(TMP_CRAFT_PASS)" --username="admin" --site-name="$(DEFAULT_SITE_NAME)"; \
- Need to run in WSL2
- Need to install
make
withsudo apt install make
- Need to install
jq
withsudo apt install jq
ddev craft users/set-password [email protected] --password=NEW_PASSWORD
cat drop.sql | ddev mysql && ddev stop && rm -rf cms && make cms-setup
- general.php
- vite.php
- tsconfig.json
- package.json
https://alpinejs.dev/advanced/csp
Make sure you are using the Pro version instead of the Lite version.