Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Craft Project Boilerplate

The goal of this project is to provide a fully working "boilerplate" (empty skeleton project) using the CraftCMS project.

Table of Content

How to Install

To start a CraftCMS project with this Boilerplate, simply:

1. Installing the boilerplate

Use the Composer create-project command to install the boilerplate:

composer create-project --prefer-dist locomotivemtl/craft-boilerplate acme

Copy environment variables

Copy the .env.example.dev file to .env:

2. Setup your local environment

Using Laravel Valet

# Move into your project's directory
cd acme

# Setup valet to use PHP 8.2 only for this project
valet isolate --site acme 8.2

# Install the dependencies
valet composer install

# Run the valet installer.
valet php craft install

# Enable the Vite plugin
valet php craft plugin/install vite

Using DDEV

# Move into your project's directory
cd acme

# Start DDEV
ddev start

# Install the dependencies
ddev composer install

# Run the valet installer.
ddev craft install

# Enable the Vite plugin
ddev craft plugin/install vite

3. Setup Vite

Using DDEV

DDEV is already setup to run Vite when the container is started.

Using Laravel Valet

Vite is a fast, modern build tool that speeds up development with instant hot reload and simplifies production bundling using native ES modules.

Add vite configurations to .env file

VITE_SERVER_URL="http://localhost"
VITE_SERVER_PORT=5173
# Make sure to set the environment to 'dev'. Otherwise, Craft won't be looking for the Vite server.
CRAFT_ENVIRONMENT=dev

4. Setup front-end tools

npm install

5. Test your installation

Start your Vite server

npm run dev

Visit your project locally http://acme.test

Dependencies and Requirements

  • PHP 8.2+
    • ext-json
    • ext-pdo
    • ext-spl
    • ext-mbstring

Development

Tips

A couple of tips have been documented here in docs/development-tips.md. Take a look at them before you begin!

Development dependencies

Authors

About

No description, website, or topics provided.

Resources

Code of conduct

Security policy

Stars

2 stars

Watchers

8 watching

Forks

Releases

Packages

Used by

Contributors

Languages