postcss-mixins
Advanced tools
Comparing version 8.0.0 to 8.1.0
20
index.js
@@ -12,2 +12,3 @@ let { join, basename, extname, relative } = require('path') | ||
let MIXINS_GLOB = '*.{js,json,css,sss,pcss}' | ||
let IS_WIN = platform().includes('win32') | ||
@@ -78,2 +79,14 @@ | ||
function watchNewMixins(helpers, mixinsDirs) { | ||
let uniqueDirsPath = Array.from(new Set(mixinsDirs)) | ||
for (let dir of uniqueDirsPath) { | ||
helpers.result.messages.push({ | ||
type: 'dir-dependency', | ||
dir, | ||
glob: MIXINS_GLOB, | ||
parent: '' | ||
}) | ||
} | ||
} | ||
function processMixinContent(rule, from) { | ||
@@ -168,3 +181,3 @@ rule.walkAtRules('mixin-content', content => { | ||
loadFrom = opts.mixinsDir.map(dir => | ||
join(dir, '*.{js,json,css,sss,pcss}').replace(/\\/g, '/') | ||
join(dir, MIXINS_GLOB).replace(/\\/g, '/') | ||
) | ||
@@ -205,2 +218,7 @@ } | ||
} | ||
}, | ||
OnceExit(_, helpers) { | ||
if (opts.mixinsDir && opts.mixinsDir.length > 0) { | ||
watchNewMixins(helpers, opts.mixinsDir) | ||
} | ||
} | ||
@@ -207,0 +225,0 @@ } |
{ | ||
"name": "postcss-mixins", | ||
"version": "8.0.0", | ||
"version": "8.1.0", | ||
"description": "PostCSS plugin for mixins", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14640
199