Download the PHP package tubalmartin/cssmin without Composer

On this page you can find all versions of the php package tubalmartin/cssmin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cssmin

A PHP port of the YUI CSS compressor

Latest Stable Version Total Downloads Daily Downloads License

This port is based on version 2.4.8 (Jun 12, 2013) of the YUI compressor.
This port contains fixes & features not present in the original YUI compressor.

Table of Contents

  1. Installation & requirements
  2. How to use
  3. Tests
  4. API Reference
  5. Who uses this?
  6. Changelog

1. Installation & requirements

Installation

Use Composer to include the library into your project:

$ composer.phar require tubalmartin/cssmin

Require Composer's autoloader file:

Requirements

2. How to use

There are three ways you can use this library:

  1. PHP
  2. CLI
  3. GUI

PHP

CLI

A binary file named cssmin will be created after installation in ./vendor/bin folder.

Output help:

Output compression result to the command line:

Output compression result to another file:

Output compression result to another file and keep sourcemap comment in the output:

See the binary help for all available CLI options.

GUI

We've made a simple web based GUI to use the compressor, it's in the gui folder.

GUI features:

How to use the GUI:

3. Tests

Tests from YUI compressor have been modified to fit this port.

How to run the test suite:

PHPUnit diffing is too simple so when a test fails it's hard to see the actual diff, that's why I've created a test runner that displays inline coloured diffs for a failing test. Only one test can be run at a time.

Here's how to use it:

4. API Reference

__construct ([ bool $raisePhpLimits ])

Class constructor, creates a new CSSmin object.

Parameters

raisePhpLimits

If TRUE, CSSmin will try to raise the values of some php configuration options. Set to FALSE to keep the values of your php configuration options. Defaults to TRUE.

run (string $css)

Minifies a string of uncompressed CSS code. run() may be called multiple times on a single CSSmin instance.

Parameters

css

A string of uncompressed CSS code. CSSmin default value: '' (empty string).

Return Values

A string of compressed CSS code or an empty string if no string is passed.

keepSourceMapComment (bool $keepSourceMap)

Sets whether to keep sourcemap comment /*# sourceMappingURL=<path> */in the output.
CSSmin default behavior: Sourcemap comment gets removed from output.

removeImportantComments (bool $removeImportantComments)

Sets whether to remove important comments from output.
CSSmin default behavior: Important comments outside declaration blocks are kept in the output.

setLinebreakPosition (int $position)

Some source control tools don't like it when files containing lines longer than, say 8000 characters, are checked in. The linebreak option is used in that case to split long lines after a specific column.

CSSmin default value: 0 (all CSS code in 1 long line).
Minimum value supported: 1.

setMaxExecutionTime (int $seconds)

Sets the max_execution_time configuration option for this script

CSSmin default value: 60
Values & notes: max_execution_time documentation

setMemoryLimit (mixed $limit)

Sets the memory_limit configuration option for this script

CSSmin default value: 128M
Values & notes: memory_limit documentation

setPcreBacktrackLimit (int $limit)

Sets the pcre.backtrack_limit configuration option for this script

CSSmin default value: 1000000
Values & notes: pcre.backtrack_limit documentation

setPcreRecursionLimit (int $limit)

Sets the pcre.recursion_limit configuration option for this script.

CSSmin default value: 500000
Values & notes: pcre.recursion_limit documentation

5. Who uses this port

6. Changelog

v4.1.1 15 Jan 2018

FIXED:

v4.1.0 16 May 2017

v4.0.0 15 May 2017

NEW:

v3.3.1 16 May 2017

v3.3.0 13 May 2017

NEW:

NOTES:

v3.2.0 10 May 2017

NEW:

IMPROVED:

FIXED:

v3.1.2 17 Apr 2017

PHP version used: 5.3.29

chunkLength v3.1.1 v3.1.2
100 6.8s 2.6s
1000 5.3s 2s
2000 5.2s 1.95s
5000 5.1s 1.9s

PHP version used: 7.0.8

chunkLength v3.1.1 v3.1.2
100 2s 0.72s
1000 1s 0.37s
2000 0.8s 0.33s
5000 0.7s 0.3s

v3.1.1 11 Apr 2017

v3.1.0 9 Apr 2017

PHP version used: 5.3.29

chunkLength v3.0.0 v3.1.0
100 38s 6.9s
1000 8.5s 5.4s
2000 7.3s 5.3s
5000 5.8s 5.2s

PHP version used: 7.0.8

chunkLength v3.0.0 v3.1.0
100 22.8s 2.1s
1000 2.9s 1.1s
2000 2s 0.9s
5000 1.3s 0.8s

v3.0.0 4 Apr 2017

v2.4.8-p10 4 Apr 2017

v2.4.8-p9 28 Mar 2017

v2.4.8-p8 27 Mar 2017

v2.4.8-p7 26 Mar 2017

v2.4.8-p6 21 Mar 2017

v2.4.8-p5 27 Feb 2017

v2.4.8-p4 22 Sep 2014

v2.4.8-p3 26 Apr 2014

v2.4.8-p2 13 Nov 2013

v2.4.8-p1 8 Aug 2013


All versions of cssmin with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.2
ext-pcre Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package tubalmartin/cssmin contains the following files

Loading the files please wait ....