1
0
mirror of https://github.com/mrclay/minify.git synced 2025-01-17 13:18:13 +01:00
minify/docs/Install.wiki.md
2017-04-03 17:49:11 -04:00

1.7 KiB

Installation

Minify requires PHP 5.3+, git, and composer.

Typical Installation

Clone the project into the min/ directory inside your document root and install its dependencies:

cd /path/to/public_html
git clone https://github.com/mrclay/minify.git min
cd min
git checkout 3.x
composer install --no-dev

Note: If you do this on localhost, make sure the min/vendor/ directory gets deployed to production.

Installing as a composer dependency

Add "mrclay/minify": "~3.0.0" to your site's composer.json, and composer install.

The following assumes your vendor directory is in your document root. Adjust the MINIFY path as needed:

cd /path/to/public_html
mkdir min
MIN=min/
MINIFY=vendor/mrclay/minify/
cp ${MINIFY}example.index.php ${MIN}index.php
cp ${MINIFY}.htaccess ${MIN}
cp ${MINIFY}config.php ${MIN}
cp ${MINIFY}groupsConfig.php ${MIN}
cp ${MINIFY}quick-test.js ${MIN}
cp ${MINIFY}quick-test.css ${MIN}

Edit min/index.php to remove the die() statement and adjust the vendor path as needed.

Note: This does not install the URL builder, but it's not necessary for operation.

Verifing it works

You can verify it works via these two URLs:

If your server supports mod_rewrite, the ? are not necessary:

Having trouble?

Write the Google Group for help.