postcss-url
Advanced tools
Comparing version 6.0.1 to 6.0.2
@@ -0,1 +1,5 @@ | ||
# 6.0.2 - 2017-04-04 | ||
Fixed: match options before analyzing | ||
([pull-88](https://github.com/postcss/postcss-url/pull/88)) | ||
# 6.0.1 - 2017-04-03 | ||
@@ -2,0 +6,0 @@ - Fixed: bug with empty options |
{ | ||
"name": "postcss-url", | ||
"version": "6.0.1", | ||
"version": "6.0.2", | ||
"description": "PostCSS plugin to rebase or inline on url().", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
@@ -64,17 +64,16 @@ 'use strict'; | ||
const replaceUrl = (url, dir, options, result, decl) => { | ||
const isFunction = typeof options.url === 'function'; | ||
if (!isFunction && isUrlShouldBeIgnored(url, options)) return; | ||
const asset = prepareAsset(url, dir, options.basePath); | ||
const relativeToRoot = path.relative(process.cwd(), asset.absolutePath); | ||
options = matchOptions(relativeToRoot, options); | ||
if (!options) return; | ||
const matchedOptions = matchOptions(relativeToRoot, options); | ||
if (!matchedOptions) return; | ||
const mode = isFunction ? 'custom' : (options.url || 'rebase'); | ||
const urlProcessor = getUrlProcessor(mode || 'rebase'); | ||
const isFunction = typeof matchedOptions.url === 'function'; | ||
if (!isFunction && isUrlShouldBeIgnored(url, matchedOptions)) return; | ||
const mode = isFunction ? 'custom' : (matchedOptions.url || 'rebase'); | ||
const urlProcessor = getUrlProcessor(mode); | ||
const warn = (message) => decl.warn(result, message); | ||
return urlProcessor(asset, dir, options, decl, warn, result); | ||
return urlProcessor(asset, dir, matchedOptions, decl, warn, result); | ||
}; | ||
@@ -81,0 +80,0 @@ |
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
29204