Skip to content

eGavr/cmb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CSS Minimizer Benchmark (CMB)

Сompares the work of CSS minimizers.

What does it already support?

Minimizers:

Archivers:

Install

$ git clone https://github.com/eGavr/cmb.git

$ cd cmb

$ npm install

Usage

Just run:

$ bin/cmb

More details:

$ bin/cmb --help
Сompares the work of CSS minimizers

Usage:
  cmb [OPTIONS]

Options:
  -h, --help : Help
  -v, --version : Shows the version number
  -o OUTPUT, --output=OUTPUT : Path to the result output file

Configuration

How to configure paths?

Go to the configuration file. In this file you can configure paths with the help of these variables:

  • toRawCSS - the path to tests — raw, not minimized CSS files.
  • toMinCSS - the path where to output minimized CSS files.
  • toArchCSS - the path where to output archived CSS files.

How to add your minimizer?

1. Go to the package.json and add your minimizer to the dependencies.

2. Go to the configuration file and add your code according to the following template:

name: minimize(require('module'), 'method')

where:

  • name - the name of your minimizer (it will be used in the log).
  • module - the required module of your minimizer.
  • method - the name of the minimization method of your minimizer (the method which recieves a raw CSS and minifies it).

3. Reinstall the dependencies.

$ npm install

4. See the usage.

How to add your archiver?

1. Go to the configuration file and add your code according to the following template:

name: archive('bash script', 'suffix')

where:

  • name - the name of your archiver (it will be used in the log).
  • bash script which archives the file.
    This script provides keyword [FILE_PATH]. When you run the benchmark, it will be replaced with the paths of all files which were minimized by all specified in the configuration file minimizers.
  • suffix which is added to a file by the archiver.

2. See the usage.

License

MIT License

About

CMB - CSS Mimimizer Benchmark

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •