understanding how to use a jS minification package
Posted: Thu Jun 04, 2015 1:07 am
hey guys how do i use this package
https://github.com/ceesvanegmond/minify
its for minifying JS scripts
i see the script below :
but its not very descriptive about what its doing .
can somebody help me out here ?
Thank you.
Gautam.
https://github.com/ceesvanegmond/minify
its for minifying JS scripts
i see the script below :
Code: Select all
<?php
$config = array(
'ignore_environments' => 'local',
'js_build_path' => '/js/builds/',
'css_builds_path' => '/css/builds',
)
$minify = new CeesVanEgmond\Minify\Providers\Javascript($public_path);
$minify->add($file)
if (in_array($environment, $config['ignore_environments']))
{
return $provider->tags();
}
if ( ! $minify->make($config['css_build_path'] ) {
$filename = $provider->tag($config['css_build_path'] . $provider->getFilename());
}
$provider->minify();
$filename = $provider->tag($config['css_build_path'] . $provider->getFilename());can somebody help me out here ?
Thank you.
Gautam.