seekgeeks/cssjsminify

CSS JS minify tool will help in minification of your entire js/css file and put in directly from where you can use it in production build. with simple command you can minify all static c content like stylesheets and javascripts to production ready code

v0.1 2019-03-23 16:39 UTC

This package is auto-updated.

Last update: 2024-04-27 09:00:21 UTC


README

68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7365656b6765656b732f6373736a736d696e6966792e737667 68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7365656b6765656b732f6373736a736d696e6966792e737667

CSS & JS minify is compact function abstracted on another awesome package matthiasmullie/minify. This library provides a universal abstraction where you can use this function for both css and js file and we have added additional feature by which you can automate all stuff, remove duplication and stay updated.

Requirement

  • PHP Package : matthiasmullie/minify, will be updated automatically.
  • PHP version : 7 (Recomended)
  • PHP cli

Installation

You can use Composer or simply Download the Release

Composer

The preferred method is via composer. Follow the installation instructions if you do not already have composer installed.

Once composer is installed, execute the following command in your project root to install this library:

composer require seekgeeks/cssjsminify

Finally, be sure to include the autoloader:

require_once '/path/to/your-project/vendor/autoload.php';

Download the Release

If you abhor using composer, you can download the package in its entirety. Download the zip/rar file for a package including this library and its dependencies.

Uncompress the zip file you download, and include the autoloader in your project:

require_once '/path/to/seekgeeks/cssjsminify/vendor/autoload.php';

How it works?

Using this library along with maintaining is super easy. You can just do following to minify your files

php path/to/file/autominify.php

This will automatically pick files from pre-configured source directory, and will create a directory if not exists say min/ inside that to place minified files. It will initiate minification only once the source file is modified within given timespan.

Example

Suppose your source file is

asset/css/style.css

Your destination file will be

asset/css/min/style.css