postcss-minify-params 5.0.0-rc.2 → 5.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +9 -7
- package/package.json +12 -14
- package/CHANGELOG.md +0 -62
package/dist/index.js
CHANGED
|
@@ -11,13 +11,11 @@ var _postcssValueParser = _interopRequireWildcard(require("postcss-value-parser"
|
|
|
11
11
|
|
|
12
12
|
var _alphanumSort = _interopRequireDefault(require("alphanum-sort"));
|
|
13
13
|
|
|
14
|
-
var _uniqs = _interopRequireDefault(require("uniqs"));
|
|
15
|
-
|
|
16
14
|
var _cssnanoUtils = require("cssnano-utils");
|
|
17
15
|
|
|
18
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var
|
|
16
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
19
17
|
|
|
20
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
18
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
19
|
|
|
22
20
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
21
|
|
|
@@ -43,6 +41,12 @@ function removeNode(node) {
|
|
|
43
41
|
node.type = 'word';
|
|
44
42
|
}
|
|
45
43
|
|
|
44
|
+
function sortAndDedupe(items) {
|
|
45
|
+
return (0, _alphanumSort.default)([...new Set(items)], {
|
|
46
|
+
insensitive: true
|
|
47
|
+
}).join();
|
|
48
|
+
}
|
|
49
|
+
|
|
46
50
|
function transform(legacy, rule) {
|
|
47
51
|
const ruleName = rule.name.toLowerCase(); // We should re-arrange parameters only for `@media` and `@supports` at-rules
|
|
48
52
|
|
|
@@ -82,9 +86,7 @@ function transform(legacy, rule) {
|
|
|
82
86
|
}
|
|
83
87
|
}
|
|
84
88
|
}, true);
|
|
85
|
-
rule.params = (
|
|
86
|
-
insensitive: true
|
|
87
|
-
}).join();
|
|
89
|
+
rule.params = sortAndDedupe((0, _cssnanoUtils.getArguments)(params).map(split));
|
|
88
90
|
|
|
89
91
|
if (!rule.params.length) {
|
|
90
92
|
rule.raws.afterName = '';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postcss-minify-params",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "Minify at-rule params with PostCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"postcss",
|
|
@@ -23,24 +23,22 @@
|
|
|
23
23
|
"homepage": "https://github.com/cssnano/cssnano",
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"alphanum-sort": "^1.0.2",
|
|
26
|
-
"browserslist": "^4.16.
|
|
27
|
-
"cssnano-utils": "^
|
|
28
|
-
"postcss-value-parser": "^4.
|
|
29
|
-
"uniqs": "^2.0.0"
|
|
30
|
-
},
|
|
31
|
-
"scripts": {
|
|
32
|
-
"prebuild": "del-cli dist",
|
|
33
|
-
"build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.js --out-dir dist --ignore \"**/__tests__/\"",
|
|
34
|
-
"prepublish": "yarn build"
|
|
26
|
+
"browserslist": "^4.16.6",
|
|
27
|
+
"cssnano-utils": "^3.0.0",
|
|
28
|
+
"postcss-value-parser": "^4.2.0"
|
|
35
29
|
},
|
|
36
30
|
"engines": {
|
|
37
31
|
"node": "^10 || ^12 || >=14.0"
|
|
38
32
|
},
|
|
39
33
|
"devDependencies": {
|
|
40
|
-
"postcss": "^8.2.
|
|
34
|
+
"postcss": "^8.2.15"
|
|
41
35
|
},
|
|
42
36
|
"peerDependencies": {
|
|
43
|
-
"postcss": "^8.2.
|
|
37
|
+
"postcss": "^8.2.15"
|
|
38
|
+
},
|
|
39
|
+
"scripts": {
|
|
40
|
+
"prebuild": "rimraf dist",
|
|
41
|
+
"build": "babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\""
|
|
44
42
|
},
|
|
45
|
-
"
|
|
46
|
-
}
|
|
43
|
+
"readme": "# postcss-minify-params [![Build Status][ci-img]][ci]\n\n> Minify at-rule params with PostCSS.\n\n```css\n@media only screen and ( min-width: 400px, min-height: 500px ) {\n h2{\n color:blue\n }\n}\n```\n\n```css\n@media only screen and (min-width:400px,min-height:500px) {\n h2{\n color:blue\n }\n}\n```\n\n## Usage\n\n```js\npostcss([ require('postcss-minify-params') ])\n```\n\nSee [PostCSS] docs for examples for your environment.\n\n## Contributors\n\nSee [CONTRIBUTORS.md](https://github.com/cssnano/cssnano/blob/master/CONTRIBUTORS.md).\n\n## License\n\nMIT © [Bogdan Chadkin](mailto:trysound@yandex.ru)\n\n[PostCSS]: https://github.com/postcss/postcss\n[ci-img]: https://travis-ci.org/cssnano/postcss-minify-params.svg\n[ci]: https://travis-ci.org/cssnano/postcss-minify-params\n"
|
|
44
|
+
}
|
package/CHANGELOG.md
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
# Change Log
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
|
-
|
|
6
|
-
# [5.0.0-rc.2](https://github.com/cssnano/cssnano/compare/postcss-minify-params@5.0.0-rc.1...postcss-minify-params@5.0.0-rc.2) (2021-03-15)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package postcss-minify-params
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
# [5.0.0-rc.1](https://github.com/cssnano/cssnano/compare/postcss-minify-params@5.0.0-rc.0...postcss-minify-params@5.0.0-rc.1) (2021-03-04)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package postcss-minify-params
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
# 5.0.0-rc.0 (2021-02-19)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
### chore
|
|
26
|
-
|
|
27
|
-
* minimum require version of node is 10.13 ([#871](https://github.com/cssnano/cssnano/issues/871)) ([28bda24](https://github.com/cssnano/cssnano/commit/28bda243e32ce3ba89b3c358a5f78727b3732f11))
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
### Features
|
|
31
|
-
|
|
32
|
-
* migarete to PostCSS 8 ([#975](https://github.com/cssnano/cssnano/issues/975)) ([40b82dc](https://github.com/cssnano/cssnano/commit/40b82dca7f53ac02cd4fe62846dec79b898ccb49))
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
### BREAKING CHANGES
|
|
36
|
-
|
|
37
|
-
* minimum supported `postcss` version is `8.2.1`
|
|
38
|
-
* minimum require version of node is 10.13
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
## 4.1.9 (2019-02-12)
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
### Bug Fixes
|
|
46
|
-
|
|
47
|
-
* do not mangle `[@page](https://github.com/page) :first` rules ([#678](https://github.com/cssnano/cssnano/issues/678)) ([69aab0b](https://github.com/cssnano/cssnano/commit/69aab0b527198979e2232a57554cf888ad868231))
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
### Performance Improvements
|
|
51
|
-
|
|
52
|
-
* **postcss-minify-params:** increase perf ([e06a24e](https://github.com/cssnano/cssnano/commit/e06a24e44aae8935290b7bc05d9da51b99367d2b))
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
## 4.1.1 (2018-09-24)
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
### Bug Fixes
|
|
60
|
-
|
|
61
|
-
* add `browserslist` to dependencies for `postcss-minify-params` ([#594](https://github.com/cssnano/cssnano/issues/594)) ([9d40806](https://github.com/cssnano/cssnano/commit/9d40806151026dcd2272dc22a76009b27224d512))
|
|
62
|
-
* **postcss-merge-longhand:** not mangle border output ([#555](https://github.com/cssnano/cssnano/issues/555)) ([9a70605](https://github.com/cssnano/cssnano/commit/9a706050b621e7795a9bf74eb7110b5c81804ffe)), closes [#553](https://github.com/cssnano/cssnano/issues/553) [#554](https://github.com/cssnano/cssnano/issues/554)
|