postcss-mixins
Advanced tools
Comparing version 4.0.0 to 4.0.1
@@ -0,1 +1,4 @@ | ||
## 4.0.1 | ||
* Fix Windows support for `mixinsFiles` and `mixinsDir` (by Hugo Agbonon). | ||
## 4.0.0 | ||
@@ -2,0 +5,0 @@ * Remove space-separated parameters. They were depreacted in 0.3. |
10
index.js
@@ -7,2 +7,3 @@ var jsToCss = require('postcss-js/parser'); | ||
var fs = require('fs'); | ||
var isWindows = require('os').platform().indexOf('win32') !== -1; | ||
@@ -138,3 +139,5 @@ function insideDefine(rule) { | ||
return globby(globs, { nocase: true }).then(function (files) { | ||
// Windows bug with { nocase: true } due to node-glob issue | ||
// https://github.com/isaacs/node-glob/issues/123 | ||
return globby(globs, { nocase: !isWindows }).then(function (files) { | ||
return Promise.all(files.map(function (file) { | ||
@@ -147,3 +150,6 @@ var ext = path.extname(file); | ||
fs.readFile(relative, function (err, contents) { | ||
if ( err ) return reject(err); | ||
if ( err ) { | ||
reject(err); | ||
return; | ||
} | ||
postcss.parse(contents) | ||
@@ -150,0 +156,0 @@ .walkAtRules('define-mixin', function (atrule) { |
{ | ||
"name": "postcss-mixins", | ||
"version": "4.0.0", | ||
"version": "4.0.1", | ||
"description": "PostCSS plugin for mixins", | ||
@@ -21,12 +21,16 @@ "keywords": [ | ||
"postcss-js": "^0.1.1", | ||
"postcss": "^5.0.14", | ||
"postcss": "^5.0.16", | ||
"globby": "^4.0.0" | ||
}, | ||
"devDependencies": { | ||
"eslint": "^1.10.3", | ||
"ava": "^0.10.0" | ||
"eslint-config-postcss": "^2.0.0", | ||
"eslint": "^2.1.0", | ||
"ava": "^0.12.0" | ||
}, | ||
"scripts": { | ||
"test": "ava test/*.js && eslint *.js test/**/*.js" | ||
}, | ||
"eslintConfig": { | ||
"extends": "eslint-config-postcss/es5" | ||
} | ||
} |
@@ -179,3 +179,3 @@ # PostCSS Mixins [![Build Status][ci-img]][ci] | ||
[PostCSS API]: https://github.com/postcss/postcss/blob/master/API.md | ||
[PostCSS API]: https://github.com/postcss/postcss/blob/master/docs/api.md | ||
@@ -182,0 +182,0 @@ ## Options |
151
14287
3
7
Updatedpostcss@^5.0.16