herrera-io/go

该软件包已被弃用,不再维护。未建议替代软件包。

一个简单的PHP构建工具。

2.2.1 2013-10-30 17:50 UTC

README

Build Status

Go是一个基于Symfony Console构建的简单PHP构建工具。

Gofile:

<?php

use Symfony\Component\Console\Input\InputInterface;
use Symfony\Component\Console\Output\OutputInterface;

// create our task
task(
    'hello',
    'Say hello',
    function (InputInterface $input, OutputInterface $output) {
        $output->writeln(
            sprintf(
                'Hello, %s%s',
                $input->getArgument('name'),
                $input->getOption('ending')
            )
        );
    }
);

// add an argument to the task
arg('name', ARG_IS_OPTIONAL, 'Your name', 'world');

// add an option to the task
option('ending', 'e', OPT_IS_OPTIONAL, 'How to end', '!');
$ bin/go hello
Hello, world!
$ bin/go hello Kevin -e .
Hello, Kevin.

文档