dbould/davework

A framework scaffolder

0.1.8-alpha 2018-10-25 09:40 UTC

This package is not auto-updated.

Last update: 2024-04-20 12:29:36 UTC


README

A Framework scaffolder.

Currently supports Slim Framework only.

Installation

composer require --dev dbould/davework
cp vendor/dbould/davework.json.example myProjectRoot/davework.json

I'm currently still working on fixing the Phar archive, but I'll add a link and instructions when that's finished.

Configuration

topLevelNamespace

eg:

{
    "topLevelNamespace": "Dbould\\Davework"
}

rootDirectory

Top level code directory eg:

{
    "rootDirectory": "src/"
}

testNamespace

eg:

{
    "testNamespace": "Test"
}

testsDirectory

eg:

{
    "testsDirectory": "test/"
}

factoriesLiveWithClasses

Optional. If set to true, factory files will be created in the same directory as the class files they're associated with. If set to false, factories go into a separate Factory/ directory. eg:

{
    "factoriesLiveWithClasses": false
}

Commands

Create new file with associated files. There is no need to append the type of the file to the end of the fileName, it will be added for you.

vendor/bin/davework slim:create-file fileName type [moduleName]

Tests

Run all test suites

vendor/bin/phpunit

Run all functional tests

vendor/bin/phpunit tests/Functional

Run all unit tests

vendor/bin/phpunit tests/Unit

Generate PHAR Archive

Generate through Box https://github.com/box-project/box2

vendor/bin/box build -v