Boiler is a framework to help you create (web)projects instead of using a skeleton project. The reason why this project is built is to win time by not updating your dependencies in your skeleton project.
composer global require glamorous/boiler
Make sure the ~/.composer/vendor/bin
directory is in your system's "PATH".
You can add multiple directories to allow boiler to search templates. To add a directory you only need to run:
boiler setup my/path
A boiler template is a simple yaml file with a couple of steps to execute, so the result is a project.
name: Default project
steps:
- create_readme
- git
create_readme:
name: Readme
script:
- touch README.md
- echo '{#PROJECT_NAME#}
==============
This is the default README.md created by boiler.' >README.md
git:
name: Initialized Git and create first commit
script:
- git init
- git commit -m 'Initial commit'
In the above example:
- added a README.md file
- initialize git & created first commit
Just like a single boiler yaml-file, you can create a directory with the same name like the yaml-file. All files that are included in this directory will be copied to the new directory. The only file that isn't copied is the yaml-template-file.
Creating a project based on your default.yml
template is as simple as:
boiler create default
The boiler script will create a directory default
and run the scripts from your template to create your project.
--dir
Define the name of the directory yourself
--name
Define the name of the project (can be used in your template as {#PROJECT_NAME#}
)
It's possible to include other created templates with extra functions to re-use. Instead of duplicating specific functions for every type of project, you can just include it and call it;
functions.yml
in a directory where boiler setup
was run:
create_readme:
name: Readme
script:
- touch README.md
- echo '{#PROJECT_NAME#}
==============
This is the default README.md created by boiler.' >README.md
git:
name: Initialized Git and create first commit
script:
- git init
- git commit -m 'Initial commit'
default.yml
in a directory where boiler setup
was run:
name: Default project
include:
- functions
steps:
- create_readme
- git
boiler create my-template
: Create an application based on the "my-template".
boiler setup my/path
: Set up a directory as a template directory (path is optional, current directory will be taken).
boiler remove my/path
: Remove a directory from the template directories (path is optional, current directory will be taken).
boiler paths
: Show all included template directories.
Please see CHANGELOG for more information what has changed recently.
$ composer test
Please see CONTRIBUTING for details. To see a list of the contributors: all contributors.
The MIT License (MIT). Please see License File for more information.