Skip to content

Commit

Permalink
1.1.2
Browse files Browse the repository at this point in the history
Fix #22
  • Loading branch information
iamvdo committed Sep 29, 2014
1 parent f3fa717 commit 519811f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 14 deletions.
24 changes: 12 additions & 12 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,18 @@ Pleeease.prototype.process = function (css) {

var processors = [];
var processorsFn = [
(opts = this.opts.import) ? importer(opts) : false,
(opts = this.opts.next.customMedia) ? media() : false,
(opts = this.opts.next.customProperties) ? vars(opts) : false,
(opts = this.opts.next.calc) ? calc() : false,
(opts = this.opts.next.colors) ? color() : false,
(opts = this.opts.filters) ? filter(opts).postcss : false,
(opts = this.opts.rem) ? rem(opts).postcss : false,
(opts = this.opts.pseudoElements) ? pseudoElements.processor : false,
(opts = this.opts.opacity) ? opacity.processor : false,
(opts = this.opts.mqpacker) ? mqpacker.processor : false,
(opts = this.opts.autoprefixer) ? prefixer(opts).postcss : false,
(opts = this.opts.minifier) ? minifier(opts).postcss : false
(opts = this.opts.import) ? importer(opts) : false,
(opts = this.opts.next.customMedia) ? media() : false,
(opts = this.opts.next.customProperties) ? vars(opts) : false,
(opts = this.opts.next.calc) ? calc() : false,
(opts = this.opts.next.colors) ? color() : false,
(opts = this.opts.filters) ? filter(opts).postcss : false,
(opts = this.opts.rem) ? rem.apply(null, opts).postcss : false,
(opts = this.opts.pseudoElements) ? pseudoElements.processor : false,
(opts = this.opts.opacity) ? opacity.processor : false,
(opts = this.opts.mqpacker) ? mqpacker.processor : false,
(opts = this.opts.autoprefixer) ? prefixer(opts).postcss : false,
(opts = this.opts.minifier) ? minifier(opts).postcss : false
];

// remove false
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pleeease",
"version": "1.1.1",
"version": "1.1.2",
"description": "Postprocess CSS with ease",
"author": {
"name": "Vincent De Oliveira"
Expand Down

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions test/features.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ describe('Features', function () {

});

it('should convert using config', function () {

var css = fs.readFileSync('test/features/rem.css', 'utf-8');
var expected = fs.readFileSync('test/features/rem.2.out.css', 'utf-8');

// process
opts.rem = ['10px', {replace: true}];
var processed = pleeease.process(css, opts);

assert.equal(processed,expected);

});

});

describe('Pseudo-elements', function () {
Expand Down
3 changes: 3 additions & 0 deletions test/features/rem.2.out.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.rem {
font-size: 20px;
}

0 comments on commit 519811f

Please sign in to comment.