2017 © Pedro Peláez
 

library taskman

Taskman is the another *ake tool written on PHP

image

bannerlog/taskman

Taskman is the another *ake tool written on PHP

  • Friday, May 17, 2013
  • by bannerlog
  • Repository
  • 2 Watchers
  • 3 Stars
  • 14,102 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Taskman

Taskman is the another *ake tool written on PHP. Use it as you wish., (*1)

Install & Run

The fastest way to install Taskman in your project is using Composer (http://getcomposer.org/)., (*2)

  1. Install composer:, (*3)

    curl -s https://getcomposer.org/installer | php
    
  2. Add Taskman as a dependency to your composer.json file:, (*4)

    {
        "require": {
            "bannerlog/taskman": "*"
        }
    }
    
  3. Install Taskman:, (*5)

    php composer.phar install
    
  4. Execute Taskman:, (*6)

    php vendor/bin/taskman.php -T
    

How to create task

First you need to create the task file. It could be named as: * Taskman * taskman * Taskman.php * taskman.php, (*7)

It is important to remember that you can write anything you like inside a task file. But be sure that you are using valid PHP syntax., (*8)

Below goes source code of the Taskman file., (*9)

<?php

desc('Simple task');
task('simple', function() {
    echo "Yeap! You have just invoked simple task!\n";
});

desc('Task with a prerequisite');
task('prerequisite', 'simple', function() {
    echo "Prerequisite task is completed.\n\n";
    echo "You can specify as many prerequisite tasks as you need.\n";
    echo "Just write them between the task name and definition of an anonymous function.\n\n";
    echo "    task(name[,'callbefore', ...], callable);\n\n";
});

group('named', function() {
    desc('Simlpe named task');
    task('task', function(){
        echo "Simple named task has been invoked.\n";
    });

    desc('Named task with a prerequisites');
    task('prerequisite', 'simple', function(){
        echo "Named prerequisite task is completed.\n\n";

        echo "If you want to call a task within the current group ";
        echo "you should place : (colon) before a prerequisite task.\n\n";
        echo "    task('name' ':callbefore', callable);\n";
        echo "    task('name' ':subgroup:anothersub:task', callable);\n\n";

        echo "If you want to call a task from a top namespace ";
        echo "you should place ^ (caret) before a prerequisite task.\n\n";
        echo "    task('name' '^callbefore', callable);\n";
        echo "    task('name' '^differentgroup:anothersubgroup:task', callable);\n\n";
    });
});

group('included', function() {
    require __DIR__ . '/tasks.php';
});

And now let's see included tasks from a task.php., (*10)

<?php

desc('Main task');
task('main', ':prepare', function() {
    echo "Main task has been invoked\n";
});

desc('Preparation task');
task('prepare', function() {
    echo "Prepare to invoke main task\n";
});

desc('Invoke simple task from outside the group');
task('simple', '^simple', function() {
    echo "And you have been done it from included:simple.\n";
});

That's all for now!, (*11)

The Versions

17/05 2013

dev-master

9999999-dev https://github.com/bannerlog/taskman

Taskman is the another *ake tool written on PHP

  Sources   Download

BSD-3-Clause

by Nick Lastovenko

17/05 2013

0.5.0

0.5.0.0 https://github.com/bannerlog/taskman

Taskman is the another *ake tool written on PHP

  Sources   Download

BSD-3-Clause

by Nick Lastovenko

23/04 2013

0.4.0

0.4.0.0 https://github.com/bannerlog/taskman

Taskman is the another *ake tool written on PHP

  Sources   Download

BSD-3-Clause

by Nick Lastovenko