From 3bc6125b8bcf5e07e351aaf6c5e71b5e3a5fe6dd Mon Sep 17 00:00:00 2001 From: Evgeniy Gavryushin Date: Wed, 3 Sep 2014 15:53:25 +0400 Subject: [PATCH 1/2] Move the 'config file' --- {lib => .cmb}/config.js | 5 +++-- lib/index.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) rename {lib => .cmb}/config.js (88%) diff --git a/lib/config.js b/.cmb/config.js similarity index 88% rename from lib/config.js rename to .cmb/config.js index 5efbc18..2501f05 100644 --- a/lib/config.js +++ b/.cmb/config.js @@ -1,7 +1,8 @@ var path = require('path'), fs = require('fs'), - minimize = require('./utils').minimize, - archive = require('./utils').archive; + utils = require('../lib/utils'), + minimize = utils.minimize, + archive = utils.archive; module.exports = { // each method is the imitation of the usage of some minimizer diff --git a/lib/index.js b/lib/index.js index d2f7b33..cf74b01 100644 --- a/lib/index.js +++ b/lib/index.js @@ -1,7 +1,7 @@ var fs = require('fs'), path = require('path'), shell = require('shelljs'), - bench = require('./config'), + bench = require('../.cmb/config'), utils = require('./utils'), minimizers = bench.minimizers, archivers = bench.archivers, From fafb26afaa0cd7358c57356029b9a6308650d49b Mon Sep 17 00:00:00 2001 From: Evgeniy Gavryushin Date: Wed, 3 Sep 2014 15:54:18 +0400 Subject: [PATCH 2/2] Update README --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index cc72a79..bd14033 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# css-minimizers-benchmark +# css-minimizers-benchmark (CMB) Сompares the work of **CSS** minimizers. @@ -38,7 +38,7 @@ $ bin/compare-minimizers ### How to configure paths? -Go to the [configuration file](https://github.com/eGavr/css-minimizers-bench/blob/master/lib/config.js#L19). In this file you can configure paths with the help of these variables: +Go to the [configuration file](https://github.com/eGavr/css-minimizers-benchmark/blob/master/.cmb/config.js#L20). In this file you can configure paths with the help of these variables: * `toRawCSS` - path to tests (raw, not minimized **CSS** files). * `toMinCSS` - path where to output minimized **CSS** files. @@ -48,7 +48,7 @@ Go to the [configuration file](https://github.com/eGavr/css-minimizers-bench/blo **1**. Go to the [package.json](https://github.com/eGavr/css-minimizers-bench/blob/master/package.json#L27) and add your minimizer to the dependencies. -**2**. Go to the [configuration file](https://github.com/eGavr/css-minimizers-bench/blob/master/lib/config.js#L8) and add your code according to the following template: +**2**. Go to the [configuration file](https://github.com/eGavr/css-minimizers-benchmark/blob/master/.cmb/config.js#L9) and add your code according to the following template: ```js name: minimize(require('module'), 'method') @@ -70,7 +70,7 @@ npm install ### How to add your archiver? -**1**. Go to the [configuration file](https://github.com/eGavr/css-minimizers-bench/blob/master/lib/config.js#L15) and add your code according to the following template: +**1**. Go to the [configuration file](https://github.com/eGavr/css-minimizers-benchmark/blob/master/.cmb/config.js#L16) and add your code according to the following template: ```js name: archive('bash script', 'suffix') @@ -79,8 +79,8 @@ 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 several **keywords**: - * `[FILE_PATH]` will be replaced with the paths of all files which were minimized by all specified in the [configuration file](https://github.com/eGavr/css-minimizers-bench/blob/master/lib/config.js#L8) minimizers. - * `[TO_ARCH_CSS]` will be replaced with the path which you have specified in variable `paths.toArchCSS` in the [configuration file](https://github.com/eGavr/css-minimizers-bench/blob/master/lib/config.js#L22). + * `[FILE_PATH]` will be replaced with the paths of all files which were minimized by all specified in the [configuration file](https://github.com/eGavr/css-minimizers-bench/blob/master/.cmb/config.js#L9) minimizers. + * `[TO_ARCH_CSS]` will be replaced with the path which you have specified in variable `paths.toArchCSS` in the [configuration file](https://github.com/eGavr/css-minimizers-bench/blob/master/.cmb/config.js#L23). * `suffix` which is added to a file by the archiver. **2**. See the [usage](https://github.com/eGavr/css-minimizers-bench#usage).