<commit_before># phulp-minifier

The minifier addon for [PHULP](https://github.com/reisraff/phulp)

## Install

```bash
$ composer require reisraff/phulp-minifier
```

## Usage

```php
<?php

use Phulp\Minifier\CssMinifier;
use Phulp\Minifier\JsMinifier;

$phulp->task('css', function ($phulp) {
    $phulp->src(['src/'], '/css$/')
        ->pipe(new CssMinifier);
});

$phulp->task('js', function ($phulp) {
    $phulp->src(['src/'], '/js$/')
        ->pipe(new JsMinifier);
});

```

### Options<commit_msg>add writing files command to readme<commit_after># phulp-minifier

The minifier addon for [PHULP](https://github.com/reisraff/phulp)

## Install

```bash
$ composer require reisraff/phulp-minifier
```

## Usage

```php
<?php

use Phulp\Minifier\CssMinifier;
use Phulp\Minifier\JsMinifier;

$phulp->task('css', function ($phulp) {
    $phulp->src(['src/'], '/css$/')
        // minify
        ->pipe(new CssMinifier)
        // write minified files
        ->pipe($phulp->dest('dist/'));
});

$phulp->task('js', function ($phulp) {
    $phulp->src(['src/'], '/js$/')
        // minify
        ->pipe(new JsMinifier)
        // write minified files
        ->pipe($phulp->dest('dist/'));
});

```

### Options
{'fraction_non_alphanumeric': 0.21546052631578946, 'fraction_numerical': 0.0, 'mean_word_length': 3.285211267605634, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5651019', 'n_tokens_mistral': 467, 'n_tokens_neox': 450, 'n_words': 82}