postcss-normalize-url
Advanced tools
Comparing version 3.0.7 to 3.0.8
@@ -0,1 +1,6 @@ | ||
# 3.0.8 | ||
* Fixes `@namespace` URL conversion; now the semantics of the URL are preserved | ||
and only the `url(foo)` to `"foo"` optimisation is performed. | ||
# 3.0.7 | ||
@@ -2,0 +7,0 @@ |
@@ -5,2 +5,6 @@ 'use strict'; | ||
var _path = require('path'); | ||
var _path2 = _interopRequireDefault(_path); | ||
var _postcss = require('postcss'); | ||
@@ -22,6 +26,2 @@ | ||
var _path = require('path'); | ||
var _path2 = _interopRequireDefault(_path); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
@@ -39,3 +39,3 @@ | ||
function transformNamespace(rule, opts) { | ||
function transformNamespace(rule) { | ||
rule.params = (0, _postcssValueParser2.default)(rule.params).walk(function (node) { | ||
@@ -47,7 +47,5 @@ if (node.type === 'function' && node.value === 'url' && node.nodes.length) { | ||
} | ||
if (node.type === 'string') { | ||
node.value = convert(node.value.trim(), opts); | ||
node.value = node.value.trim(); | ||
} | ||
return false; | ||
@@ -64,3 +62,3 @@ }).toString(); | ||
var url = node.nodes[0]; | ||
var escaped = undefined; | ||
var escaped = void 0; | ||
@@ -74,3 +72,3 @@ node.before = node.after = ''; | ||
if (! ~url.value.indexOf('chrome-extension')) { | ||
if (!~url.value.indexOf('chrome-extension')) { | ||
url.value = convert(url.value, opts); | ||
@@ -105,3 +103,3 @@ } | ||
} else if (node.type === 'atrule' && node.name === 'namespace') { | ||
return transformNamespace(node, opts); | ||
return transformNamespace(node); | ||
} | ||
@@ -108,0 +106,0 @@ }); |
{ | ||
"name": "postcss-normalize-url", | ||
"version": "3.0.7", | ||
"version": "3.0.8", | ||
"description": "Normalize URLs with PostCSS", | ||
@@ -13,3 +13,4 @@ "main": "dist/index.js", | ||
"prepublish": "del-cli dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/", | ||
"test": "ava src/__tests__" | ||
"test": "ava src/__tests__", | ||
"test-012": "ava src/__tests__" | ||
}, | ||
@@ -33,12 +34,15 @@ "keywords": [ | ||
"devDependencies": { | ||
"ava": "^0.11.0", | ||
"babel-cli": "^6.5.1", | ||
"babel-core": "^6.5.1", | ||
"babel-plugin-add-module-exports": "^0.1.2", | ||
"babel-preset-es2015": "^6.5.0", | ||
"ava": "^0.17.0", | ||
"babel-cli": "^6.3.17", | ||
"babel-core": "^6.3.26", | ||
"babel-plugin-add-module-exports": "^0.2.1", | ||
"babel-preset-es2015": "^6.3.13", | ||
"babel-preset-es2015-loose": "^7.0.0", | ||
"babel-preset-stage-0": "^6.5.0", | ||
"babel-preset-stage-0": "^6.3.13", | ||
"babel-register": "^6.9.0", | ||
"del-cli": "^0.2.0", | ||
"eslint": "^1.10.3", | ||
"eslint-config-cssnano": "^1.0.0" | ||
"eslint": "^3.0.0", | ||
"eslint-config-cssnano": "^3.0.0", | ||
"eslint-plugin-babel": "^3.3.0", | ||
"eslint-plugin-import": "^2.0.1" | ||
}, | ||
@@ -56,4 +60,4 @@ "homepage": "https://github.com/ben-eb/postcss-normalize-url", | ||
"ava": { | ||
"require": "babel-core/register" | ||
"require": "babel-register" | ||
} | ||
} |
9498
13