PHP code example of gabrieljmj / junty-minify
1. Go to this page and download the library: Download gabrieljmj/junty-minify library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
gabrieljmj / junty-minify example snippets
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'));
});