Code Monkey home page Code Monkey logo

pake's Introduction

PHP Make

Pake is a simple task runner.

Pake is a Make-like program implemented in PHP.
Tasks and dependencies are specified in standard PHP syntax.

Pakefiles (pake's version of Makefiles) are completely defined in standard PHP syntax.

Installation

These commands requires you to have Composer installed globally. Open a command console, enter your project directory and execute the following commands to download the latest stable version:

composer require --dev roukmoute/pake

Usage

Example

First, you must write a Pakefile file which contains the build rules.
Here's a simple example:

<?php

use PhpCsFixer\Console\Application;
use Symfony\Component\Console\Input\ArrayInput;

task(
    'default',
    function () {
        return ['fix'];
    }
);

desc('PHP Coding Standards Fixer');
task(
    'fix',
    function () {
        $application = new Application();
        $application->setAutoExit(false);
        $application->run(new ArrayInput(['fix']));
    }
);

This Pakefile has two tasks:

  • A task named fix, which – upon invocation – will fix your code to follow standards in PHP:
▶ php ./vendor/bin/pake fix
  • A task named default. This task does nothing by itself, but it has exactly one dependency, namely the fix task.
    Invoking the default task will cause Pake to invoke the fix task as well.

Running the pake command without any options will cause it to run the default task in the Pakefile:

▶ php ./vendor/bin/pake
Loaded config default from ".php_cs.dist".
Using cache file ".php_cs.cache".

Type --help for all available options.

pake's People

Contributors

roukmoute avatar

Stargazers

Flug avatar Guillaume Loulier avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

siggwer

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.