postcss-normalize-url
Advanced tools
Comparing version
@@ -0,1 +1,7 @@ | ||
# 4.0.0-rc.0 | ||
* Breaking: Drops support for Node 0.12, we now require at least Node 4. | ||
* Breaking: Update PostCSS to 6.0.0. | ||
* Breaking: `stripWWW` is now set to `false` by default. | ||
# 3.0.8 | ||
@@ -2,0 +8,0 @@ |
'use strict'; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
@@ -71,5 +73,5 @@ var _path = require('path'); | ||
if (escapeChars.test(url.value)) { | ||
if (escapeChars.test(url.value) && url.type === 'string') { | ||
escaped = url.value.replace(escapeChars, '\\$1'); | ||
if (escaped.length < url.value.length + (url.type === 'string' ? 2 : 0)) { | ||
if (escaped.length < url.value.length + 2) { | ||
url.value = escaped; | ||
@@ -86,7 +88,7 @@ url.type = 'word'; | ||
module.exports = _postcss2.default.plugin('postcss-normalize-url', function (opts) { | ||
opts = _extends({ | ||
exports.default = _postcss2.default.plugin('postcss-normalize-url', function (opts) { | ||
opts = Object.assign({}, { | ||
normalizeProtocol: false, | ||
stripFragment: false, | ||
stripWWW: true | ||
stripWWW: false | ||
}, opts); | ||
@@ -103,2 +105,3 @@ | ||
}; | ||
}); | ||
}); | ||
module.exports = exports['default']; |
{ | ||
"name": "postcss-normalize-url", | ||
"version": "3.0.8", | ||
"version": "4.0.0-rc.0", | ||
"description": "Normalize URLs with PostCSS", | ||
@@ -11,6 +11,3 @@ "main": "dist/index.js", | ||
"scripts": { | ||
"pretest": "eslint src", | ||
"prepublish": "del-cli dist && BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/", | ||
"test": "ava src/__tests__", | ||
"test-012": "ava src/__tests__" | ||
"prepublish": "cross-env BABEL_ENV=publish babel src --out-dir dist --ignore /__tests__/" | ||
}, | ||
@@ -29,22 +26,11 @@ "keywords": [ | ||
"is-absolute-url": "^2.0.0", | ||
"normalize-url": "^1.4.0", | ||
"postcss": "^5.0.14", | ||
"postcss-value-parser": "^3.2.3" | ||
"normalize-url": "^1.0.0", | ||
"postcss": "^6.0.0", | ||
"postcss-value-parser": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"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.3.13", | ||
"babel-register": "^6.9.0", | ||
"del-cli": "^0.2.0", | ||
"eslint": "^3.0.0", | ||
"eslint-config-cssnano": "^3.0.0", | ||
"eslint-plugin-babel": "^3.3.0", | ||
"eslint-plugin-import": "^2.0.1" | ||
"babel-cli": "^6.0.0", | ||
"cross-env": "^3.0.0" | ||
}, | ||
"homepage": "https://github.com/ben-eb/postcss-normalize-url", | ||
"homepage": "https://github.com/ben-eb/cssnano", | ||
"author": { | ||
@@ -55,9 +41,9 @@ "name": "Ben Briggs", | ||
}, | ||
"repository": "ben-eb/postcss-normalize-url", | ||
"eslintConfig": { | ||
"extends": "cssnano" | ||
"repository": "ben-eb/cssnano", | ||
"bugs": { | ||
"url": "https://github.com/ben-eb/cssnano/issues" | ||
}, | ||
"ava": { | ||
"require": "babel-register" | ||
"engines": { | ||
"node": ">=4" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# [postcss][postcss]-normalize-url [][ci] [][npm] [][deps] | ||
# [postcss][postcss]-normalize-url | ||
@@ -44,8 +44,7 @@ > [Normalize URLs](https://github.com/sindresorhus/normalize-url) with PostCSS. | ||
Please see the [normalize-url documentation][docs]. By default, | ||
`normalizeProtocol` & `stripFragment` are set to `false`; `stripWWW` to `true`. | ||
`normalizeProtocol`, `stripFragment` & `stripWWW` are set to `false`. | ||
## Contributing | ||
## Contributors | ||
Pull requests are welcome. If you add functionality, then please add unit tests | ||
to cover it. | ||
See [CONTRIBUTORS.md](https://github.com/ben-eb/cssnano/blob/master/CONTRIBUTORS.md). | ||
@@ -57,6 +56,2 @@ ## License | ||
[docs]: https://github.com/sindresorhus/normalize-url#options | ||
[ci]: https://travis-ci.org/ben-eb/postcss-normalize-url | ||
[deps]: https://gemnasium.com/ben-eb/postcss-normalize-url | ||
[npm]: http://badge.fury.io/js/postcss-normalize-url | ||
[postcss]: https://github.com/postcss/postcss |
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
2
-84.62%79
3.95%0
-100%8575
-9.72%56
-8.2%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated