Changeset e29cc2e for trip-planner-front/node_modules/postcss-colormin
- Timestamp:
- 11/25/21 22:08:24 (3 years ago)
- Branches:
- master
- Children:
- 8d391a1
- Parents:
- 59329aa
- Location:
- trip-planner-front/node_modules/postcss-colormin
- Files:
-
- 2 deleted
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trip-planner-front/node_modules/postcss-colormin/dist/minifyColor.js
r59329aa re29cc2e 6 6 exports.default = minifyColor; 7 7 8 var _color = require("./lib/color");8 var _colord = require("colord"); 9 9 10 var _getShortestString = _interopRequireDefault(require("./lib/getShortestString")); 10 var _names = _interopRequireDefault(require("colord/plugins/names")); 11 12 var _minify = _interopRequireDefault(require("colord/plugins/minify")); 11 13 12 14 function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } 13 15 16 (0, _colord.extend)([_names.default, _minify.default]); 14 17 /** 15 18 * Performs color value minification … … 19 22 * @param {boolean} options.supportsTransparent – Does the browser support "transparent" value properly 20 23 */ 24 21 25 function minifyColor(input, options = {}) { 22 26 const settings = { … … 25 29 ...options 26 30 }; 27 const instance = (0, _color .process)(input);31 const instance = (0, _colord.colord)(input); 28 32 29 33 if (instance.isValid()) { 30 // Try to shorten the string if it is a valid CSS color value. 31 // Fall back to the original input if it's smaller or has equal length/ 32 return (0, _getShortestString.default)([input.toLowerCase(), instance.toShortString(settings)]); 34 // Try to shorten the string if it is a valid CSS color value 35 const minified = instance.minify({ 36 alphaHex: settings.supportsAlphaHex, 37 transparent: settings.supportsTransparent, 38 name: true 39 }); // Fall back to the original input if it's smaller or has equal length 40 41 return minified.length < input.length ? minified : input.toLowerCase(); 33 42 } else { 34 43 // Possibly malformed, so pass through -
trip-planner-front/node_modules/postcss-colormin/package.json
r59329aa re29cc2e 1 1 { 2 "_args": [ 3 [ 4 "postcss-colormin@5.2.0", 5 "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front" 6 ] 7 ], 8 "_development": true, 9 "_from": "postcss-colormin@5.2.0", 10 "_id": "postcss-colormin@5.2.0", 2 "_from": "postcss-colormin@^5.2.1", 3 "_id": "postcss-colormin@5.2.1", 11 4 "_inBundle": false, 12 "_integrity": "sha512- +HC6GfWU3upe5/mqmxuqYZ9B2Wl4lcoUUNkoaX59nEWV4EtADCMiBqui111Bu8R8IvaZTmqmxrqOAqjbHIwXPw==",5 "_integrity": "sha512-VVwMrEYLcHYePUYV99Ymuoi7WhKrMGy/V9/kTS0DkCoJYmmjdOMneyhzYUxcNgteKDVbrewOkSM7Wje/MFwxzA==", 13 6 "_location": "/postcss-colormin", 14 7 "_phantomChildren": {}, 15 8 "_requested": { 16 "type": " version",9 "type": "range", 17 10 "registry": true, 18 "raw": "postcss-colormin@ 5.2.0",11 "raw": "postcss-colormin@^5.2.1", 19 12 "name": "postcss-colormin", 20 13 "escapedName": "postcss-colormin", 21 "rawSpec": " 5.2.0",14 "rawSpec": "^5.2.1", 22 15 "saveSpec": null, 23 "fetchSpec": " 5.2.0"16 "fetchSpec": "^5.2.1" 24 17 }, 25 18 "_requiredBy": [ 26 19 "/cssnano-preset-default" 27 20 ], 28 "_resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.2.0.tgz", 29 "_spec": "5.2.0", 30 "_where": "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front", 21 "_resolved": "https://registry.npmjs.org/postcss-colormin/-/postcss-colormin-5.2.1.tgz", 22 "_shasum": "6e444a806fd3c578827dbad022762df19334414d", 23 "_spec": "postcss-colormin@^5.2.1", 24 "_where": "C:\\Users\\DELL\\Desktop\\bachelor-thesis\\trip-planner-front\\node_modules\\cssnano-preset-default", 31 25 "author": { 32 26 "name": "Ben Briggs", … … 37 31 "url": "https://github.com/cssnano/cssnano/issues" 38 32 }, 33 "bundleDependencies": false, 39 34 "dependencies": { 40 35 "browserslist": "^4.16.6", 41 36 "caniuse-api": "^3.0.0", 42 "colord": "^2. 0.1",37 "colord": "^2.9.1", 43 38 "postcss-value-parser": "^4.1.0" 44 39 }, 40 "deprecated": false, 45 41 "description": "Minify colors in your CSS files with PostCSS.", 46 42 "devDependencies": { … … 54 50 "LICENSE-MIT" 55 51 ], 56 "gitHead": " 9b3c54fd94f3e2bdb503d1e21f171d7fe02f33ca",52 "gitHead": "2d84646671c7075f8dae35de310351aac3436bc0", 57 53 "homepage": "https://github.com/cssnano/cssnano", 58 54 "keywords": [ … … 77 73 "scripts": { 78 74 "build": "cross-env BABEL_ENV=publish babel src --config-file ../../babel.config.json --out-dir dist --ignore \"**/__tests__/\"", 79 "prebuild": " del-clidist",80 "prep ublish": "yarn build"75 "prebuild": "rimraf dist", 76 "prepare": "yarn build" 81 77 }, 82 "version": "5.2. 0"78 "version": "5.2.1" 83 79 }
Note:
See TracChangeset
for help on using the changeset viewer.