glamorous / boiler
Scripts runner to start a web application from scratch
Requires
- php: ^7.3
- ext-json: *
- symfony/console: ^4.1
- symfony/finder: ^4.2
- symfony/process: ^4.2
- symfony/yaml: ^4.2
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.13@dev
- jakub-onderka/php-parallel-lint: dev-master
- maglnet/composer-require-checker: ^1.0@dev
- mikey179/vfsstream: ^1.6
- php-mock/php-mock: dev-master
- phpmd/phpmd: dev-master
- phpro/grumphp: dev-master
- phpstan/phpstan: ^0.10.0@dev
- phpunit/phpunit: ^7.5
- povils/phpmnd: ^2.0@dev
- roave/security-advisories: dev-master
- sebastian/phpcpd: ^4.0@dev
- sensiolabs/security-checker: ^6.0
- squizlabs/php_codesniffer: ^3.0@dev
README
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.
Installation
composer global require glamorous/boiler
Make sure the ~/.composer/vendor/bin
directory is in your system's "PATH".
How to use it?
Create a folder for your (custom) boiler templates
You can add multiple directories to allow boiler to search templates. To add a directory you only need to run:
boiler setup my/path
Create a boiler templates
Single boiler-file
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
Boiler directory
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.
Create a project with your created template
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.
Extra options
--dir
Define the name of the directory yourself
--name
Define the name of the project (can be used in your template as {#PROJECT_NAME#}
)
Include templates
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
Commands
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.
Changelog
Please see CHANGELOG for more information what has changed recently.
Testing
$ composer test
Contributing
Please see CONTRIBUTING for details. To see a list of the contributors: all contributors.
License
The MIT License (MIT). Please see License File for more information.