2017 © Pedro Peláez
 

library genesis

image

genesis-php/genesis

  • Tuesday, November 8, 2016
  • by enlilcz
  • Repository
  • 2 Watchers
  • 1 Stars
  • 1,253 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 39 Versions
  • 0 % Grown

The README.md

Genesis

Build Status Build status Scrutinizer Code Quality Code Coverage Latest Stable Version License, (*1)

Genesis is lightweight, smart and easy to use CLI tool, for building (mainly) PHP applications. Usage is similar to Phing, but Genesis is much easier. For configuration is used an .neon file, which is very similar to YAML., (*2)

Installation

Preferred installation is with Composer., (*3)

composer require genesis-php/genesis , (*4)

Compatibility

This software is developed primarily for UNIX systems (Linux, OSX), but it works also on Windows., (*5)

Quick example

Look at the example which gives you quick introduction.
Don't worry, it will take only minute., (*6)

Getting started

Initialize build directory in your project: (path to your vendor directory may differ!)
../vendor/bin/genesis self-init , (*7)

An 'build' directory will be created, with these files: - Build.php - PHP class with runXyz() methods - every public method starting with 'run' is an "Task" - in task you can run any code you want - there is public method 'setup', it runs slightly after Build class is constructed - for example - config.neon - config in NEON format (very similar to YAML) - define parameters and services - you can include another configs directly in NEON file:
includes:
- include.neon - if you don't want to merge any config variable, add ! (exclamation mark), eg:
myParam!: unoverrided value - for example - bootstrap.php (optional) - to load Build class and other classes - for example - build (optional) - shell script which is only shortcut into vendor directory with genesis, (*8)

Look at the skeleton, how can build directory looks like., (*9)

CLI

This tool is intended to use via CLI only., (*10)

Run it by (path to your vendor directory may differ!):
../vendor/bin/genesis mytask , (*11)

OR via shortcut, which creates self-init (you may need to edit path to vendor dir in file 'build/build'):
./build/build mytask , (*12)

You can use any working directory with parameter "--working-dir":, (*13)

Supported options: - --working-dir /var/www/myproject - use specified working directory - --colors 0 - disable colored output - --config myconfig.neon - use specified config, (*14)

All arguments are passed to build:, (*15)

../vendor/bin/genesis mytask foo , (*16)

Arguments mytask and foo will be available in your build class (property $arguments), (*17)

Commands

Commands are intended to use them in Tasks. In namespace Genesis\Commands are default commands and of course you can create and use your own commands., (*18)

Common

  • Exec
    • executes shell command
    • returns an ExecResult including return code and output
  • Git
    • executes Git command & can clone any repository
    • returns an ExecResult including return code and output
  • Help
    • prints list of available tasks to output
    • list is given in simple array
  • NodeJs
    • can install packages (npm install) in any directory
  • PhpUnit
    • can run PHPUnit tests in any directory & provides some setup
  • NetteTester
    • can run Nette Tester tests in any directory & provides some setup

Assets

  • Assets\Gulp
    • Running gulp, usually to build frontend
    • You can setup gulpfile location
  • Assets\Less
    • if you want only compile LESS files on build, you can use this command
    • using NodeJs lessc tool

Filesystem

Test

This set of commands may be useful, if you want to check system some system requirements, usually at the beginning of the build. - Test\NodeJs - tests NodeJs version - Test\Php - tests PHP ini settings - tests if desired extension present - Test\NodeJs - tests if desired programs is installed (on UNIX), (*19)

Integration

An bootstrap.php in build directory can return instance of Genesis\Config\Container which will be merged into Container created from config.neon, (*20)

The Versions

08/11 2016

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires

08/11 2016

v2.10.3

2.10.3.0

  Sources   Download

MIT

The Requires

 

The Development Requires

10/08 2016

v2.10.2

2.10.2.0

  Sources   Download

MIT

The Requires

 

The Development Requires

10/08 2016

v2.10.1

2.10.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

09/08 2016

v2.10.0

2.10.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

09/08 2016

dev-win

dev-win

  Sources   Download

MIT

The Requires

 

The Development Requires

29/07 2016

v2.9.2

2.9.2.0

  Sources   Download

MIT

The Requires

 

The Development Requires

28/07 2016

v2.9.1

2.9.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

28/07 2016

dev-tester

dev-tester

  Sources   Download

MIT

The Requires

 

The Development Requires

26/06 2016

v2.7.0

2.7.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

26/06 2016

v2.6.0

2.6.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

11/06 2016

v2.5.0

2.5.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

01/06 2016

v2.4.1

2.4.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

29/05 2016

v2.4.0

2.4.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

26/05 2016

v2.3.0

2.3.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

23/05 2016

v2.2.1

2.2.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

17/05 2016

v2.2.0

2.2.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

14/05 2016

v2.1.3

2.1.3.0

  Sources   Download

MIT

The Requires

 

The Development Requires

13/05 2016

v2.1.2

2.1.2.0

  Sources   Download

MIT

The Requires

 

The Development Requires

13/05 2016

v2.1.1

2.1.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

13/05 2016

v2.1.0

2.1.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

12/05 2016

v2.0.0

2.0.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

16/04 2016

v1.4.1

1.4.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

14/04 2016

v1.5.1

1.5.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

14/04 2016

v1.5.0

1.5.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

14/04 2016

v1.4.0

1.4.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

13/04 2016

v1.3.0

1.3.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

13/04 2016

v1.2.8

1.2.8.0

  Sources   Download

MIT

The Requires

 

The Development Requires

06/04 2016

v1.2.7

1.2.7.0

  Sources   Download

MIT

The Requires

 

The Development Requires

03/04 2016

v1.2.6

1.2.6.0

  Sources   Download

MIT

The Requires

 

The Development Requires

03/04 2016

v1.2.5

1.2.5.0

  Sources   Download

MIT

The Requires

 

The Development Requires

27/03 2016

v1.2.4

1.2.4.0

  Sources   Download

MIT

The Requires

 

The Development Requires

20/03 2016

v1.2.3

1.2.3.0

  Sources   Download

MIT

The Requires

 

The Development Requires

20/03 2016

v1.2.2

1.2.2.0

  Sources   Download

The Requires

 

12/03 2016

v1.2.1

1.2.1.0

  Sources   Download

The Requires

 

08/03 2016

v1.2.0

1.2.0.0

  Sources   Download

The Requires

 

06/03 2016

v1.1.1

1.1.1.0

  Sources   Download

The Requires

 

03/03 2016

v1.1.0

1.1.0.0

  Sources   Download

The Requires

 

02/03 2016

v1.0.0

1.0.0.0

  Sources   Download

The Requires