postcss-colormin 7.0.6 → 7.0.7
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/package.json +3 -3
- package/src/minifyColor.js +6 -5
- package/types/minifyColor.d.ts.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "postcss-colormin",
|
|
3
|
-
"version": "7.0.
|
|
3
|
+
"version": "7.0.7",
|
|
4
4
|
"description": "Minify colors in your CSS files with PostCSS.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"types": "types/index.d.ts",
|
|
@@ -27,9 +27,9 @@
|
|
|
27
27
|
},
|
|
28
28
|
"repository": "cssnano/cssnano",
|
|
29
29
|
"dependencies": {
|
|
30
|
+
"@colordx/core": "^5.0.0",
|
|
30
31
|
"browserslist": "^4.28.1",
|
|
31
32
|
"caniuse-api": "^3.0.0",
|
|
32
|
-
"colord": "^2.9.3",
|
|
33
33
|
"postcss-value-parser": "^4.2.0"
|
|
34
34
|
},
|
|
35
35
|
"bugs": {
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@types/caniuse-api": "^3.0.6",
|
|
43
|
-
"postcss": "^8.5.
|
|
43
|
+
"postcss": "^8.5.8"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|
|
46
46
|
"postcss": "^8.4.32"
|
package/src/minifyColor.js
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
'use strict';
|
|
2
|
-
const { colord, extend } = require('
|
|
3
|
-
const
|
|
4
|
-
const
|
|
2
|
+
const { colordx: colord, extend } = require('@colordx/core');
|
|
3
|
+
const hwbPlugin = require('@colordx/core/plugins/hwb');
|
|
4
|
+
const namesPlugin = require('@colordx/core/plugins/names');
|
|
5
|
+
const minifierPlugin = require('@colordx/core/plugins/minify');
|
|
5
6
|
|
|
6
|
-
extend(/** @type {any[]} */ ([namesPlugin, minifierPlugin]));
|
|
7
|
+
extend(/** @type {any[]} */ ([hwbPlugin, namesPlugin, minifierPlugin]));
|
|
7
8
|
|
|
8
9
|
/**
|
|
9
10
|
* Performs color value minification
|
|
10
11
|
*
|
|
11
12
|
* @param {string} input - CSS value
|
|
12
|
-
* @param {import('./index.js').MinifyColorOptions} options - object with
|
|
13
|
+
* @param {import('./index.js').MinifyColorOptions} options - object with colordx.minify() options
|
|
13
14
|
* @return {string}
|
|
14
15
|
*/
|
|
15
16
|
module.exports = function minifyColor(input, options = {}) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"minifyColor.d.ts","sourceRoot":"","sources":["../src/minifyColor.js"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"minifyColor.d.ts","sourceRoot":"","sources":["../src/minifyColor.js"],"names":[],"mappings":"AAeiB,iCAJN,MAAM,YACN,OAAO,YAAY,EAAE,kBAAkB,GACtC,MAAM,CAejB"}
|