Matthew Blode's Craft 3 base project
This is a scaffolding package for Craft 3 CMS projects. In addition to setting up a new Craft 3 CMS project, this project sets up:
- Craft CMS 3.*
- Installs the following plugins:
- Scaffolds multi-environment setup
- Installs all plugins
- Sets up entire CP - Sections, Assets, All Settings, Users, Fields, Transforms, Globals
- Sets up and configures plugins - stuff like renaming plugin names, etc
- Sets up widgets
- Contains front-end framework to get started on new projects
You'll only need to perform the following steps once, or for a brand-new computer. For day-to-day use, refer to the next section.
In order to use this scaffolding tool, you'll need to install Composer - a PHP package manager. If you have not installed Composer, follow the macOS/Linux/Unix instructions (install it globally).
Next, make sure you're on the latest Composer version:
This project package works exactly the way Pixel & Tonic's craftcms/craft package works.
First in Beanstalk, create your new repository for the project you're working on. Clone this (empty) repository locally, and open a terminal in the root of the project folder. For instance:
1. Create a new Git repository called `example` 2. Clone it via Tower to `~/web` 3. Open a new terminal and `cd ~/web/example`
Now you're in the project folder, create a new project by running the following command:
composer create-project mblode/craft3 ./temp -sdev --prefer-dist && mv temp/* temp/.[^.]* . && rm -rf temp/
Let's break this down. The
create-project command downloads and sets up a new Craft project from our base repository. However, the command requires the directory to be empty, which is currently isn't due to it now being a Git repository (a hidden
.git folder). So, we create our project in
./temp as a temporary folder. Then, we move all files up one folder with
mv temp/* temp/.[^.]* . and delete the temporary folder with
rm -rf temp/.
Once the above has completed, you'll be presented with the Craft Welcome screen. Run
./craft setup to start configuring your project's database and other settings.
Hint: To do everying in a single one-liner, use the following:
composer create-project mblode/craft3 ./temp -sdev --prefer-dist && mv temp/* temp/.[^.]* . && rm -rf temp/ && ./craft setup