2017 © Pedro Pelรกez
 

library construct

PHP project/micro-package generator.

image

jonathantorres/construct

PHP project/micro-package generator.

  • Tuesday, April 10, 2018
  • by jonathantorres
  • Repository
  • 11 Watchers
  • 249 Stars
  • 385 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 15 Forks
  • 12 Open issues
  • 34 Versions
  • 1 % Grown

The README.md

Construct

Build Status Build Status Version PDS Skeleton, (*1)

A PHP project/micro-package generator for PDS compliant projects or micro-packages., (*2)

Installation

Construct should be installed globally through composer., (*3)

composer global require jonathantorres/construct

Make sure that ~/.composer/vendor/bin is on your $PATH. This way the construct executable can be located., (*4)

Assumptions

As Construct utilizes Composer's CLI, it's assumed that Composer is installed. When using the option to initialize an empty Git repo (i.e. --git or -g) it's also assumed that Git is installed., (*5)

Usage

Just run construct generate with your vendor/package declaration and it will construct a basic PHP project into the package directory. For example, if you run construct generate jonathantorres/logger it will generate a basic project structure inside the logger folder., (*6)

construct generate jonathantorres/logger

The generated project structure will look like the following tree excerpt. Files and directories in parentheses are optional., (*7)

โ”œโ”€โ”€ logger
โ”‚   โ”œโ”€โ”€ CHANGELOG.md
โ”‚   โ”œโ”€โ”€ (CONDUCT.md)
โ”‚   โ”œโ”€โ”€ composer.json
โ”‚   โ”œโ”€โ”€ composer.lock
โ”‚   โ”œโ”€โ”€ CONTRIBUTING.md
โ”‚   โ”œโ”€โ”€ (.appveyor.yml)
โ”‚   โ”œโ”€โ”€ (.editorconfig)
โ”‚   โ”œโ”€โ”€ (.env)
โ”‚   โ”œโ”€โ”€ (.env.example)
โ”‚   โ”œโ”€โ”€ (.git)
โ”‚   โ”‚ย ย  โ””โ”€โ”€ ...
โ”‚   โ”œโ”€โ”€ .gitattributes
โ”‚   โ”œโ”€โ”€ (.github)
โ”‚   โ”‚ย ย  โ”œโ”€โ”€ CONTRIBUTING.md
โ”‚   โ”‚ย ย  โ”œโ”€โ”€ ISSUE_TEMPLATE.md
โ”‚   โ”‚ย ย  โ””โ”€โ”€ PULL_REQUEST_TEMPLATE.md
โ”‚   โ”œโ”€โ”€ .gitignore
โ”‚   โ”œโ”€โ”€ .gitmessage
โ”‚   โ”œโ”€โ”€ (.lgtm)
โ”‚   โ”œโ”€โ”€ (bin)
โ”‚   โ”‚ย ย  โ””โ”€โ”€ cli-script
โ”‚   โ”œโ”€โ”€ LICENSE.md
โ”‚   โ”œโ”€โ”€ (MAINTAINERS)
โ”‚   โ”œโ”€โ”€ (.php_cs)
โ”‚   โ”œโ”€โ”€ (phpunit.xml.dist)
โ”‚   โ”œโ”€โ”€ README.md
โ”‚   โ”œโ”€โ”€ (docs)
โ”‚   โ”‚ย ย  โ””โ”€โ”€ index.md
โ”‚   โ”œโ”€โ”€ src
โ”‚   โ”‚ย ย  โ””โ”€โ”€ Logger.php
โ”‚   โ”œโ”€โ”€ tests
โ”‚   โ”‚ย ย  โ””โ”€โ”€ LoggerTest.php
โ”‚   โ”œโ”€โ”€ .travis.yml
โ”‚   โ”œโ”€โ”€ (Vagrantfile)
โ”‚   โ””โ”€โ”€ vendor
โ”‚           โ””โ”€โ”€ ...

This is a good starting point. You can continue your work from there., (*8)

Select testing framework

The --test-framework or --test option will allow you to select a testing framework. One of the following is available at the moment: phpunit, phpspec, codeception or behat. phpunit is currently the default., (*9)

construct generate jonathantorres/logger --test-framework=codeception

You can also use the short option -t., (*10)

construct generate jonathantorres/logger -t codeception

Select license

The --license option will allow you to select a license for the project to construct. One of the following is available at the moment: MIT, Apache-2.0, GPL-2.0 or GPL-3.0. MIT is currently the default., (*11)

construct generate jonathantorres/logger --license=Apache-2.0

You can also use the short option -l., (*12)

construct generate jonathantorres/logger -l Apache-2.0

Specify a namespace

The --namespace option will allow you to specify a namespace for the project to construct. This is totally optional. By default construct will use the package name as the namespace., (*13)

construct generate jonathantorres/logger --namespace=JonathanTorres\\Projects\\Logger

You can also use the short option -s., (*14)

construct generate jonathantorres/logger -s JonathanTorres\\Projects\\Logger

Specify a CLI framework

The optional --cli-framework option will allow you to specify a CLI framework for the project to construct, while also creating a bin directory with an initial CLI script in it, adding a bin key in the project's composer.json, and an initial AppVeyor configuration. When the option has been set without a CLI composer package the symfony/console package will be used per default. There's no short option available., (*15)

construct generate jonathantorres/logger --cli-framework=zendframework/zend-console

Specify PHP version

The --php option will allow you to specify the minimum required PHP version that your project will support. Construct will use the currently installed version if not specified., (*16)

construct generate jonathantorres/logger --php=5.6.31

Specify Composer keywords

The optional --keywords option will allow you to specify a comma separated list of Composer keywords., (*17)

construct generate jonathantorres/logger --keywords=log,logging

You can also use the short option -k., (*18)

construct generate jonathantorres/logger -k=log,logging

Initialize an empty Git repo?

The --git option will allow you to initialize an empty Git repository inside the constructed project., (*19)

construct generate jonathantorres/logger --git

You can also use the short option -g., (*20)

construct generate jonathantorres/logger -g

Generate a PHP Coding Standards Fixer configuration?

The --phpcs option will generate a PHP Coding Standards Fixer configuration within the constructed project and add a Travis CI script for validation during builds. The generated .php_cs configuration defaults to the PSR-2 coding style guide., (*21)

construct generate jonathantorres/logger --phpcs

You can also use the short option -p., (*22)

construct generate jonathantorres/logger -p

Generate a Vagrantfile?

The --vagrant option will generate a basic Vagrantfile within the constructed project, defaulting to the output of a vagrant init call plus a minimal vagrant-cachier plugin configuration. There's no short option available., (*23)

construct generate jonathantorres/logger --vagrant

Generate an EditorConfig configuration?

The --editor-config option will generate an EditorConfig configuration within the constructed project., (*24)

construct generate jonathantorres/logger --editor-config

You can also use the short option -e., (*25)

construct generate jonathantorres/logger -e

Generate .env enviroment files?

The --env option will generate .env environment files within the constructed project for keeping sensitive information out of it. There's no short option available., (*26)

construct generate jonathantorres/logger --env

Generate LGTM configuration files?

The --lgtm option will generate LGTM configuration files within the constructed project. There's no short option available., (*27)

construct generate jonathantorres/logger --lgtm

Generate common GitHub files?

The --github option will generate common GitHub (i.e. templates and docs) files. There's no short option available., (*28)

construct generate jonathantorres/logger --github

Generate GitHub template files?

The --github-templates option will generate GitHub template files within the constructed project into a folder conventionally named .github. It also will move CONTRIBUTING.md into it. There's no short option available, but the option is implicated with the github option., (*29)

construct generate jonathantorres/logger --github-templates

Generate GitHub documentation files?

The --github-docs option will generate GitHub documentation files within the constructed project into a folder conventionally named docs. There's no short option available, but the option is implicated with the github option., (*30)

construct generate jonathantorres/logger --github-docs

Generate a Code of Conduct?

The --code-of-conduct option will generate a Code of Conduct file named CONDUCT.md within the constructed project and also add a reference to it in the generated README.md. The used Code of Conduct is adapted from the Contributor Covenant, version 1.4. There's no short option available., (*31)

construct generate jonathantorres/logger --code-of-conduct

Use a configuration for recurring settings

The --config option allows the usage of a configuration file in the YAML format. There are two ways to provide such a configuration file: One is to provide a specific file as an option argument, the other is to put a .construct configuration file in the home directory of your system. For the structure of a configuration file have a look at the .construct example file. When no configuration keys are provided for settings having a default value (i.e. test-framework, license, php) their default value is used., (*32)

construct generate jonathantorres/logger --config /path/to/config.yml

You can also use the short option -c., (*33)

construct generate jonathantorres/logger -c /path/to/config.yml

When there's a .construct configuration file in your home directory it will be used per default. If required it's possible to disable the usage via the --ignore-default-config option or the equivalent short option -i., (*34)

Interactive Mode

This mode will ask you all the required (and optional) information to generate your project., (*35)

construct generate:interactive

Running tests

bash composer construct:test, (*36)

License

This library is licensed under the MIT license. Please see LICENSE for more details., (*37)

Changelog

Please see CHANGELOG for more details., (*38)

Contributing

Please see CONTRIBUTING for more details., (*39)

The Versions

10/04 2018

dev-master

9999999-dev

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

01/04 2018

v2.0.0

2.0.0.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

19/01 2018

1.x-dev

1.9999999.9999999.9999999-dev

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

05/01 2018

2.0.x-dev

2.0.9999999.9999999-dev

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

27/10 2017

v1.16.0

1.16.0.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

19/09 2017

v1.15.2

1.15.2.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

31/08 2017

dev-rewrite

dev-rewrite

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

29/08 2017

v1.15.1

1.15.1.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

17/07 2017

v1.15.0

1.15.0.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

08/04 2017

v1.14.1

1.14.1.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

30/03 2017

v1.14.0

1.14.0.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

02/03 2017

v1.13.1

1.13.1.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

11/12 2016

v1.13.0

1.13.0.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

18/09 2016

v1.12.0

1.12.0.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

10/09 2016

v1.11.0

1.11.0.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

10/07 2016

v1.10.1

1.10.1.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

28/05 2016

v1.10.0

1.10.0.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

10/04 2016

v1.9.0

1.9.0.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

12/03 2016

v1.8.0

1.8.0.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

24/01 2016

v1.7.1

1.7.1.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

30/12 2015

v1.7.0

1.7.0.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

18/12 2015

v1.6.0

1.6.0.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

07/11 2015

v1.5.0

1.5.0.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

18/09 2015

v1.4.3

1.4.3.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

07/09 2015

v1.4.2

1.4.2.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

29/08 2015

v1.4.1

1.4.1.0

PHP project/micro-package generator.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli package project

09/08 2015

v1.4.0

1.4.0.0

Cli command to generate a basic PHP project structure.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli project

10/06 2015

v1.3.0

1.3.0.0

Cli command to generate a basic PHP project structure.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli project

28/05 2015

v1.2.0

1.2.0.0

Cli command to generate a basic PHP project structure.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli project

19/05 2015

v1.1.0

1.1.0.0

Cli command to generate a basic PHP project structure.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli project

15/05 2015

v1.0.3

1.0.3.0

Cli command to generate a basic PHP project structure.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli project

12/05 2015

v1.0.2

1.0.2.0

Cli command to generate a basic PHP project structure.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli project

25/04 2015

v1.0.1

1.0.1.0

Cli command to generate a basic PHP project structure.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli project

25/04 2015

v1.0.0

1.0.0.0

Cli command to generate a basic PHP project structure.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Jonathan Torres

php structure cli project