reisraff/phulp-filter

Filter your files

2.0.0 2018-03-15 15:51 UTC

This package is auto-updated.

Last update: 2024-03-28 03:00:05 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;
        }));
});