2008-08-29 22:56:34 +00:00
|
|
|
<?php
|
|
|
|
/**
|
Work on: Issue 125, Issue 126, Issue 132, Issue 134, Issue 138, Issue 139, Issue 147, Issue 149, Issue 151, Issue 162, Issue 166
2010-05-09 16:43:47 +00:00
|
|
|
* Configuration for "min", the default application built with the Minify
|
|
|
|
* library
|
|
|
|
*
|
2008-08-29 22:56:34 +00:00
|
|
|
* @package Minify
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
2012-03-10 11:48:32 -05:00
|
|
|
/**
|
|
|
|
* Allow use of the Minify URI Builder app. Only set this to true while you need it.
|
2012-03-15 14:01:39 -04:00
|
|
|
*/
|
2015-09-29 14:31:47 -04:00
|
|
|
$min_enableBuilder = false;
|
2012-03-10 11:48:32 -05:00
|
|
|
|
2015-09-02 17:08:33 -03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Concatenate but do not minify the files. This can be used for testing.
|
|
|
|
*/
|
|
|
|
$min_concatOnly = false;
|
|
|
|
|
|
|
|
|
2012-03-15 14:01:39 -04:00
|
|
|
/**
|
|
|
|
* If non-empty, the Builder will be protected with HTTP Digest auth.
|
|
|
|
* The username is "admin".
|
|
|
|
*/
|
|
|
|
$min_builderPassword = 'admin';
|
|
|
|
|
2012-03-10 11:48:32 -05:00
|
|
|
|
2008-08-29 22:56:34 +00:00
|
|
|
/**
|
2016-02-27 01:13:28 -05:00
|
|
|
* Set to true to log messages to FirePHP (Firefox Firebug addon) and PHP's error_log
|
2009-01-26 00:44:43 +00:00
|
|
|
* Set to false for no error logging (Minify may be slightly faster).
|
|
|
|
*/
|
|
|
|
$min_errorLogger = false;
|
|
|
|
|
|
|
|
|
2010-05-10 07:44:40 +00:00
|
|
|
/**
|
2010-09-30 04:31:58 +00:00
|
|
|
* To allow debug mode output, you must set this option to true.
|
2010-05-10 07:44:40 +00:00
|
|
|
*
|
|
|
|
* Once true, you can send the cookie minDebug to request debug mode output. The
|
|
|
|
* cookie value should match the URIs you'd like to debug. E.g. to debug
|
|
|
|
* /min/f=file1.js send the cookie minDebug=file1.js
|
|
|
|
* You can manually enable debugging by appending "&debug" to a URI.
|
|
|
|
* E.g. /min/?f=script1.js,script2.js&debug
|
|
|
|
*
|
|
|
|
* In 'debug' mode, Minify combines files with no minification and adds comments
|
|
|
|
* to indicate line #s of the original files.
|
|
|
|
*/
|
|
|
|
$min_allowDebugFlag = false;
|
|
|
|
|
|
|
|
|
2009-01-26 00:44:43 +00:00
|
|
|
/**
|
|
|
|
* For best performance, specify your temp directory here. Otherwise Minify
|
|
|
|
* will have to load extra code to guess. Some examples below:
|
2008-08-29 22:56:34 +00:00
|
|
|
*/
|
2009-01-25 19:40:51 +00:00
|
|
|
//$min_cachePath = 'c:\\WINDOWS\\Temp';
|
2008-08-29 22:56:34 +00:00
|
|
|
//$min_cachePath = '/tmp';
|
2008-09-07 02:56:28 +00:00
|
|
|
//$min_cachePath = preg_replace('/^\\d+;/', '', session_save_path());
|
2014-09-20 10:47:59 +02:00
|
|
|
|
2010-07-25 05:11:41 +00:00
|
|
|
/**
|
|
|
|
* To use APC/Memcache/ZendPlatform for cache storage, require the class and
|
|
|
|
* set $min_cachePath to an instance. Example below:
|
|
|
|
*/
|
|
|
|
//$min_cachePath = new Minify_Cache_APC();
|
2008-08-24 00:30:30 +00:00
|
|
|
|
|
|
|
|
2008-09-18 01:56:29 +00:00
|
|
|
/**
|
2009-01-27 15:15:43 +00:00
|
|
|
* Leave an empty string to use PHP's $_SERVER['DOCUMENT_ROOT'].
|
|
|
|
*
|
|
|
|
* On some servers, this value may be misconfigured or missing. If so, set this
|
|
|
|
* to your full document root path with no trailing slash.
|
2009-01-26 00:44:43 +00:00
|
|
|
* E.g. '/home/accountname/public_html' or 'c:\\xampp\\htdocs'
|
|
|
|
*
|
|
|
|
* If /min/ is directly inside your document root, just uncomment the
|
2009-01-26 17:06:01 +00:00
|
|
|
* second line. The third line might work on some Apache servers.
|
2009-01-26 00:44:43 +00:00
|
|
|
*/
|
|
|
|
$min_documentRoot = '';
|
2015-09-28 15:36:52 -04:00
|
|
|
//$min_documentRoot = dirname(dirname(__DIR__));
|
2010-07-08 04:25:05 +00:00
|
|
|
//$min_documentRoot = substr(__FILE__, 0, -15);
|
2009-01-26 17:06:01 +00:00
|
|
|
//$min_documentRoot = $_SERVER['SUBDOMAIN_DOCUMENT_ROOT'];
|
2009-01-26 00:44:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Cache file locking. Set to false if filesystem is NFS. On at least one
|
|
|
|
* NFS system flock-ing attempts stalled PHP for 30 seconds!
|
2008-09-18 01:56:29 +00:00
|
|
|
*/
|
|
|
|
$min_cacheFileLocking = true;
|
|
|
|
|
|
|
|
|
2009-03-01 21:04:21 +00:00
|
|
|
/**
|
|
|
|
* Combining multiple CSS files can place @import declarations after rules, which
|
|
|
|
* is invalid. Minify will attempt to detect when this happens and place a
|
|
|
|
* warning comment at the top of the CSS output. To resolve this you can either
|
|
|
|
* move the @imports within your CSS files, or enable this option, which will
|
|
|
|
* move all @imports to the top of the output. Note that moving @imports could
|
|
|
|
* affect CSS values (which is why this option is disabled by default).
|
|
|
|
*/
|
|
|
|
$min_serveOptions['bubbleCssImports'] = false;
|
|
|
|
|
|
|
|
|
2008-09-18 01:56:29 +00:00
|
|
|
/**
|
Work on: Issue 125, Issue 126, Issue 132, Issue 134, Issue 138, Issue 139, Issue 147, Issue 149, Issue 151, Issue 162, Issue 166
2010-05-09 16:43:47 +00:00
|
|
|
* Cache-Control: max-age value sent to browser (in seconds). After this period,
|
|
|
|
* the browser will send another conditional GET. Use a longer period for lower
|
|
|
|
* traffic but you may want to shorten this before making changes if it's crucial
|
2008-08-24 00:30:30 +00:00
|
|
|
* those changes are seen immediately.
|
2009-01-26 00:44:43 +00:00
|
|
|
*
|
|
|
|
* Note: Despite this setting, if you include a number at the end of the
|
|
|
|
* querystring, maxAge will be set to one year. E.g. /min/f=hello.css&123456
|
2008-08-24 00:30:30 +00:00
|
|
|
*/
|
|
|
|
$min_serveOptions['maxAge'] = 1800;
|
2008-08-29 22:56:34 +00:00
|
|
|
|
|
|
|
|
2013-11-13 20:18:19 -05:00
|
|
|
/**
|
2015-09-28 20:30:20 -04:00
|
|
|
* To use the CSS compressor that shipped with 2.x, uncomment the following line:
|
2013-11-13 20:18:19 -05:00
|
|
|
*/
|
2015-09-28 20:30:20 -04:00
|
|
|
//$min_serveOptions['minifiers'][Minify::TYPE_CSS] = array('Minify_CSS', 'minify');
|
2013-11-13 20:18:19 -05:00
|
|
|
|
|
|
|
|
2010-08-02 00:30:24 +00:00
|
|
|
/**
|
2012-03-15 10:00:41 -04:00
|
|
|
* To use Google's Closure Compiler API to minify Javascript (falling back to JSMin
|
|
|
|
* on failure), uncomment the following line:
|
2010-08-02 00:30:24 +00:00
|
|
|
*/
|
2012-03-15 10:00:41 -04:00
|
|
|
//$min_serveOptions['minifiers']['application/x-javascript'] = array('Minify_JS_ClosureCompiler', 'minify');
|
2010-08-02 00:30:24 +00:00
|
|
|
|
|
|
|
|
2008-08-29 22:56:34 +00:00
|
|
|
/**
|
|
|
|
* If you'd like to restrict the "f" option to files within/below
|
|
|
|
* particular directories below DOCUMENT_ROOT, set this here.
|
|
|
|
* You will still need to include the directory in the
|
|
|
|
* f or b GET parameters.
|
|
|
|
*
|
2009-01-26 17:06:01 +00:00
|
|
|
* // = shortcut for DOCUMENT_ROOT
|
2008-08-29 22:56:34 +00:00
|
|
|
*/
|
2008-09-18 01:56:29 +00:00
|
|
|
//$min_serveOptions['minApp']['allowDirs'] = array('//js', '//css');
|
2008-08-29 22:56:34 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set to true to disable the "f" GET parameter for specifying files.
|
|
|
|
* Only the "g" parameter will be considered.
|
|
|
|
*/
|
2008-09-18 01:56:29 +00:00
|
|
|
$min_serveOptions['minApp']['groupsOnly'] = false;
|
2008-08-24 00:30:30 +00:00
|
|
|
|
Work on: Issue 125, Issue 126, Issue 132, Issue 134, Issue 138, Issue 139, Issue 147, Issue 149, Issue 151, Issue 162, Issue 166
2010-05-09 16:43:47 +00:00
|
|
|
|
2008-08-24 00:30:30 +00:00
|
|
|
/**
|
Work on: Issue 125, Issue 126, Issue 132, Issue 134, Issue 138, Issue 139, Issue 147, Issue 149, Issue 151, Issue 162, Issue 166
2010-05-09 16:43:47 +00:00
|
|
|
* By default, Minify will not minify files with names containing .min or -min
|
|
|
|
* before the extension. E.g. myFile.min.js will not be processed by JSMin
|
|
|
|
*
|
|
|
|
* To minify all files, set this option to null. You could also specify your
|
|
|
|
* own pattern that is matched against the filename.
|
2008-08-29 22:56:34 +00:00
|
|
|
*/
|
Work on: Issue 125, Issue 126, Issue 132, Issue 134, Issue 138, Issue 139, Issue 147, Issue 149, Issue 151, Issue 162, Issue 166
2010-05-09 16:43:47 +00:00
|
|
|
//$min_serveOptions['minApp']['noMinPattern'] = '@[-\\.]min\\.(?:js|css)$@i';
|
2008-08-24 00:30:30 +00:00
|
|
|
|
|
|
|
|
2009-01-28 20:02:25 +00:00
|
|
|
/**
|
|
|
|
* If you minify CSS files stored in symlink-ed directories, the URI rewriting
|
|
|
|
* algorithm can fail. To prevent this, provide an array of link paths to
|
|
|
|
* target paths, where the link paths are within the document root.
|
|
|
|
*
|
|
|
|
* Because paths need to be normalized for this to work, use "//" to substitute
|
|
|
|
* the doc root in the link paths (the array keys). E.g.:
|
|
|
|
* <code>
|
|
|
|
* array('//symlink' => '/real/target/path') // unix
|
|
|
|
* array('//static' => 'D:\\staticStorage') // Windows
|
|
|
|
* </code>
|
|
|
|
*/
|
|
|
|
$min_symlinks = array();
|
|
|
|
|
|
|
|
|
2008-08-24 00:30:30 +00:00
|
|
|
/**
|
|
|
|
* If you upload files from Windows to a non-Windows server, Windows may report
|
2008-09-05 04:22:57 +00:00
|
|
|
* incorrect mtimes for the files. This may cause Minify to keep serving stale
|
|
|
|
* cache files when source file changes are made too frequently (e.g. more than
|
|
|
|
* once an hour).
|
|
|
|
*
|
|
|
|
* Immediately after modifying and uploading a file, use the touch command to
|
|
|
|
* update the mtime on the server. If the mtime jumps ahead by a number of hours,
|
2008-09-11 20:37:16 +00:00
|
|
|
* set this variable to that number. If the mtime moves back, this should not be
|
|
|
|
* needed.
|
|
|
|
*
|
|
|
|
* In the Windows SFTP client WinSCP, there's an option that may fix this
|
|
|
|
* issue without changing the variable below. Under login > environment,
|
|
|
|
* select the option "Adjust remote timestamp with DST".
|
|
|
|
* @link http://winscp.net/eng/docs/ui_login_environment#daylight_saving_time
|
2008-08-24 00:30:30 +00:00
|
|
|
*/
|
|
|
|
$min_uploaderHoursBehind = 0;
|
|
|
|
|
2008-10-07 20:47:15 +00:00
|
|
|
|
2015-09-29 14:35:43 -04:00
|
|
|
/**
|
|
|
|
* Advanced: you can replace some of the PHP classes Minify uses to serve requests.
|
|
|
|
* To do this, assign a callable to one of the elements of the $min_factories array.
|
|
|
|
*
|
|
|
|
* You can see the default implementations (and what gets passed in) in index.php.
|
|
|
|
*/
|
2016-02-27 01:13:28 -05:00
|
|
|
//$min_factories['minify'] = ... a callable accepting a Minify\App object
|
|
|
|
//$min_factories['controller'] = ... a callable accepting a Minify\App object
|
2015-09-29 14:35:43 -04:00
|
|
|
|