Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gabrieljmj/junty-minify

[Junty plugin] :ant: Minify CSS and JS files
https://github.com/gabrieljmj/junty-minify

Last synced: about 2 months ago
JSON representation

[Junty plugin] :ant: Minify CSS and JS files

Awesome Lists containing this project

README

        

junty-minify
============
Junty plugin for CSS and JS minification.

## Installation
```bash
$ composer require --dev gabrieljmj/junty-minify
```

## Usage
It is simple to use:
```php
use Gabrieljmj\JuntyMinify\{Css as CssMinifier, Js as JsMinifier};

// CSS
$junty->task('css_minify', function () {
$this->src('./public/css/*.css')
->forStreams(new CssMinifier())
->forStreams($this->toDir('public/dist/css'));
});

// JS
$junty->task('js_minify', function () {
$this->src('./public/js/*.js')
->forStreams(new JsMinifier())
->forStreams($this->toDir('public/dist/js'));
});
```