Streams handling with tasks for PHP 7. Inspired by
<?php
require 'vendor/autoload.php';
use Junty\Runner\JuntyRunner;
use Gabrieljmj\JuntyMinify\{Css as CssMinifier, Js as JsMinifier}; // Package: gabrieljmj/junty-minify
$junty = new JuntyRunner();
$junty->group('minify', function () {
$junty->task('css', function () {
$this->src('./public/css/*.css')
->forStreams(new CssMinifier())
->forStreams($this->toDir('./public/dist/css'));
});
$junty->task('js', function () {
$this->src('./public/js/*.js')
->forStreams(new JsMinifier())
->forStreams($this->toDir('./public/dist/js'));
});
});
return $junty;
@gabrieljmj |
Junty is under MIT License.