bettercss-preprocessor
Advanced tools
Comparing version
@@ -54,2 +54,7 @@ #!/usr/bin/env node | ||
// Fix for relative import paths | ||
options = objectAssign({}, options, { | ||
from: input | ||
}); | ||
read(input, function(error, buffer) { | ||
@@ -56,0 +61,0 @@ |
{ | ||
"name": "bettercss-preprocessor", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "A modular processor for bettercss", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -10,2 +10,3 @@ 'use strict'; | ||
var bettercss = require('../'); | ||
var objectAssign = require('object-assign'); | ||
@@ -26,5 +27,7 @@ var test; | ||
// @TODO Find out why import paths are not relative | ||
it('import', function() { | ||
return test('import', {}); | ||
return test('import', { | ||
// Fix for relative paths | ||
from: path.join(__dirname, './fixtures/import.css') | ||
}); | ||
}); | ||
@@ -47,11 +50,11 @@ | ||
test = function(fixture, options) { | ||
var input = fixture + '.css'; | ||
var expected = fixture + '.expected.css'; | ||
var input = path.join(__dirname, 'fixtures', fixture + '.css'); | ||
var expected = path.join(__dirname, 'fixtures', fixture + '.expected.css'); | ||
input = fs.readFileSync(path.join(__dirname, 'fixtures', input), 'utf8'); | ||
expected = fs.readFileSync(path.join(__dirname, 'fixtures', expected), 'utf8'); | ||
input = fs.readFileSync(input, 'utf8'); | ||
expected = fs.readFileSync(expected, 'utf8'); | ||
// Return promise | ||
return postcss([ bettercss(options) ]) | ||
.process(input) | ||
return postcss([ bettercss() ]) | ||
.process(input, options) | ||
.then(function (result) { | ||
@@ -58,0 +61,0 @@ expect(result.css).to.eql(expected); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
38007
0.08%230
2.22%