Kenneth Reitz

I am going to attempt use this space to further understand the world we are in... or assume we are. All work on this page, unless otherwise stated, is ©2007 Kenneth Reitz. All rights Reserved. Feel free to contact me.

thechangelog:

It’s always refreshing to see language communities learning from eachother. PHP now as its own clone of GNU Make and Ruby’s Rake: Phake.

Automation Ahoy!

Phake supports task grouping, before/after blocks, and task descriptions. Requires PHP >= 5.3 (for closures).

Here’s a simple task definiton:

task('dependency1', function() {
      echo "i will run first!\n";
});

task('dependency2', function() {
  echo "i will run second!\n";
});

task('task_name', 'dependency1', dependency2', function() {
      echo "i will run last!\n";
});

And to run the task, simply:

./phake task_name

[Source on GitHub]

  1. kennethreitz reblogged this from thechangelog
  2. thechangelog posted this