reisraff/phulp-filter

Filter your files

2.0.0 2018-03-15 15:51 UTC

This package is auto-updated.

Last update: 2020-10-07 16:36:07 UTC


README

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;
        }));
});