soy-php/replace-task

Replace task for Soy

0.1.1 2015-11-20 17:39 UTC

This package is not auto-updated.

Last update: 2024-05-25 16:50:18 UTC


README

Latest Stable Version Total Downloads Latest Unstable Version License

Introduction

This is a replace task for Soy, you can use this task to replace strings in files based on a specific config.

Usage

Include soy-php/replace-task in your project with composer:

$ composer require soy-php/replace-task

Then in your recipe you can use the task as follows:

<?php

$recipe = new \Soy\Recipe();

$recipe->component('default', function (\Soy\Replace\ReplaceTask $replaceTask) {
    $replaceTask
        ->setReplacements([
            'task' => 'dog',
        ])
        ->setSource('README.md')
        ->setDestination('DONTREADME.md')
        ->run();
});

return $recipe;