2017 © Pedro Peláez
 

library m_nify

Simple JavaScript / CSS Minifier

image

crypto_scythe/m_nify

Simple JavaScript / CSS Minifier

  • Monday, May 4, 2015
  • by crypto_scythe
  • Repository
  • 1 Watchers
  • 0 Stars
  • 9 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

m_nify - Simple JavaScript / CSS Minifier

Simple PHP library for minifying and concatenating JavaScript and CSS files for use in my projects., (*1)

Installing

File composer.json, (*2)

{
  "require": {
    "crypto_scythe/m_nify": "*"
  }
}

Then on command line:, (*3)

composer install

Usage

<?php

require( 'vendor/autoload.php' );

new \crypto_scythe\m_nify();

?>

To minify the files just add the GET parameter files to the file which instantiates the m_nify object like this:, (*4)

http://example.com/m_nify.php?files=/path/to/first_file.css,/path/to/second_file.css

Options

Per default m_nify uses the DOCUMENT_ROOT for fetching the file. If you have your files in a different location you need to define the path like this before instantiating the m_nify object., (*5)

define( 'M_NIFY_PATH', $_SERVER['DOCUMENT_ROOT'] . '/path/to/files' );

By using this you can shorten the paths or restrict it to a specific folder., (*6)

Additional Information

m_nify automatically removes ".." from given file paths and automatically adds "/" in front of them so make sure you don't use relative paths when specifying files. However the ".." is allowed in the M_NIFY_PATH constant., (*7)

License

m_nify is licensed under the MIT License. See the LICENSE file for details., (*8)

Used libraries

JShrink from Robert Hafner - Github
CssMin from Joe Scylla - Github / Google Code, (*9)

The Versions

04/05 2015

dev-master

9999999-dev https://github.com/crypto-scythe/m_nify

Simple JavaScript / CSS Minifier

  Sources   Download

MIT

The Requires

 

by Chris Fasel

css php javascript minify asset optimisation asset optimization asset minification

04/05 2015

1.0.0

1.0.0.0 https://github.com/crypto-scythe/m_nify

Simple JavaScript / CSS Minifier

  Sources   Download

MIT

The Requires

 

by Chris Fasel

css php javascript minify asset optimisation asset optimization asset minification