Skip to content

reisraff/phulp-filter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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