mirror of
https://github.com/mrclay/minify.git
synced 2025-08-22 13:42:48 +02:00
Change custom path explanation to match full custom paths changes.
This commit is contained in:
17
MIN.txt
17
MIN.txt
@@ -132,10 +132,10 @@ echo "<link rel=stylesheet href='{$cssUri}'>";
|
||||
|
||||
STORING CONFIG FILES OUTSIDE THE MINIFY DIRECTORY
|
||||
|
||||
It is possible to store config files (config.php, config-test.php, groupsConfig.php)
|
||||
in a custom directory outside the Minify directory. This is useful if you wish to
|
||||
include Minify as an external dependency inside another project via SVN external or
|
||||
Git submodule inclusion.
|
||||
It is possible to store config files (min/config.php, min/config-test.php,
|
||||
min/groupsConfig.php) in a custom directory outside the Minify directory. This is
|
||||
useful if you wish to include Minify as an external dependency inside another
|
||||
project via SVN external or Git submodule inclusion.
|
||||
|
||||
For example, let's assume you have a Minify directory "min" in your site root. Then
|
||||
you could create a new directory called "min-configs" in the site root. Copy any
|
||||
@@ -145,13 +145,18 @@ Then create a new file, for example "min.php" in your site root. The contents of
|
||||
this file could look like this:
|
||||
|
||||
<?php
|
||||
define('MINIFY_CUSTOM_CONFIG_DIR', dirname(__FILE__) . '/min-configs');
|
||||
$customConfigDirectory = dirname(__FILE__) . '/min-configs';
|
||||
$min_customConfigPaths = array(
|
||||
'standard' => $customConfigDirectory . '/config.php',
|
||||
'test' => $customConfigDirectory . '/config-test.php',
|
||||
'groups' => $customConfigDirectory . '/groupsConfig.php'
|
||||
);
|
||||
|
||||
include_once 'min/index.php';
|
||||
|
||||
You would then reference min.php in your JS and CSS links instead of min/index.php.
|
||||
|
||||
This method will also affect those using the Minify_getUri() function. You will need
|
||||
This method will affect those using the Minify_getUri() function. You will need
|
||||
to add options to calls to that function, e.g.:
|
||||
|
||||
<?php
|
||||
|
Reference in New Issue
Block a user