postcss-modules
Advanced tools
Comparing version 0.6.1 to 0.6.2
@@ -54,14 +54,15 @@ 'use strict'; | ||
function isGlobalModule(globalModules, inputFile) { | ||
return globalModules.some(function (regex) { | ||
return inputFile.match(regex); | ||
}); | ||
} | ||
function getDefaultPluginsList(opts, inputFile) { | ||
var globalModulesWhitelist = opts.globalModulePaths || null; | ||
var globalModulesList = opts.globalModulePaths || null; | ||
var defaultBehaviour = getDefaultScopeBehaviour(opts); | ||
var generateName = getScopedNameGenerator(opts); | ||
if (globalModulesWhitelist) { | ||
var isGlobalModule = globalModulesWhitelist.some(function (regex) { | ||
return inputFile.match(regex); | ||
}); | ||
var moduleBehaviour = isGlobalModule ? _behaviours.behaviours.GLOBAL : _behaviours.behaviours.LOCAL; | ||
return (0, _behaviours.getDefaultPlugins)(moduleBehaviour, generateName); | ||
if (globalModulesList && isGlobalModule(globalModulesList, inputFile)) { | ||
return (0, _behaviours.getDefaultPlugins)(_behaviours.behaviours.GLOBAL, generateName); | ||
} | ||
@@ -68,0 +69,0 @@ |
@@ -0,1 +1,4 @@ | ||
## 0.6.2 | ||
* Refactored `getDefaultPluginsList` function | ||
## 0.6.1 | ||
@@ -2,0 +5,0 @@ * Fixed `generateScopedName` bug with multiple postcss-modules instances (https://github.com/css-modules/postcss-modules/issues/37) |
{ | ||
"name": "postcss-modules", | ||
"version": "0.6.1", | ||
"version": "0.6.2", | ||
"description": "PostCSS plugin to use CSS Modules everywhere", | ||
@@ -5,0 +5,0 @@ "main": "build/index.js", |
47802
112