Skip to content

Latest commit

 

History

History
27 lines (19 loc) · 498 Bytes

README.md

File metadata and controls

27 lines (19 loc) · 498 Bytes

phulp-filter

The filter addon for PHULP.

Install

$ composer require reisraff/phulp-filter

Usage

<?php

use Phulp\Filter\Filter;
use Phulp\DistFile;

$phulp->task('filter', function ($phulp) {
    $phulp->src(['src/'], '/html$/')
        ->pipe(new Filter(function (DistFile $distFile) {
            // and then foo.html will be removed
            return $distFile->getName() !== 'foo.html' ? true : false;
        }));
});