├── .gitignore ├── package.json ├── LICENSE ├── src ├── cli.js ├── get-units-and-px-width.js └── index.js ├── README.md └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "unit-golf", 3 | "version": "1.0.1", 4 | "license": "MIT", 5 | "main": "src/index.js", 6 | "bin": { 7 | "unit-golf": "src/cli.js" 8 | }, 9 | "scripts": {}, 10 | "devDependencies": {}, 11 | "dependencies": { 12 | "chalk": "^2.4.2", 13 | "minimist": "^1.2.0", 14 | "ora": "^3.4.0", 15 | "puppeteer": "^1.14.0" 16 | }, 17 | "description": "helps shorten pixel units for cssbattle.dev", 18 | "repository": { 19 | "type": "git", 20 | "url": "git+https://github.com/alexzaworski/unit-golf.git" 21 | }, 22 | "engines": { 23 | "node": ">=8" 24 | }, 25 | "keywords": [ 26 | "css", 27 | "golf", 28 | "unit" 29 | ], 30 | "author": "Alex Zaworski (https://zawor.ski)", 31 | "bugs": { 32 | "url": "https://github.com/alexzaworski/unit-golf/issues" 33 | }, 34 | "homepage": "https://github.com/alexzaworski/unit-golf" 35 | } 36 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 Alex Zaworski 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /src/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const minimist = require("minimist"); 4 | const ora = require("ora"); 5 | const chalk = require("chalk"); 6 | 7 | const unitGolf = require("./index"); 8 | 9 | const args = minimist(process.argv.slice(2)); 10 | 11 | const { 12 | _: [input], 13 | tolerance, 14 | width, 15 | height 16 | } = args; 17 | 18 | const spinner = ora(); 19 | spinner.start(); 20 | 21 | const renderOffset = offset => { 22 | if (offset === 0) return ""; 23 | return `(${(offset > 0 ? "+" : "") + offset}px)`; 24 | }; 25 | 26 | const renderBest = option => { 27 | const { string, pixelOffset } = option; 28 | return [ 29 | chalk.hex("#8bc34a").bold(`⛳ ${string}`), 30 | chalk.green(renderOffset(pixelOffset)) 31 | ].join(" "); 32 | }; 33 | 34 | const renderRest = option => { 35 | const { string, pixelOffset } = option; 36 | return [string, renderOffset(pixelOffset)].join(" "); 37 | }; 38 | 39 | unitGolf({ input, tolerance, width, height }).then(([best, ...rest]) => { 40 | spinner.stop(); 41 | console.log(""); 42 | console.log(renderBest(best)); 43 | console.log(""); 44 | console.log(rest.map(renderRest).join("\n")); 45 | console.log(""); 46 | }); 47 | -------------------------------------------------------------------------------- /src/get-units-and-px-width.js: -------------------------------------------------------------------------------- 1 | const puppeteer = require("puppeteer"); 2 | 3 | const UNITS = [ 4 | "px", 5 | "vw", 6 | "vh", 7 | "in", 8 | "cm", 9 | "mm", 10 | "pt", 11 | "pc", 12 | "em", 13 | "ex", 14 | "q", 15 | "ch" 16 | ]; 17 | 18 | const measureUnits = (value, units) => { 19 | const el = document.createElement("div"); 20 | document.body.appendChild(el); 21 | 22 | const measureEl = widthValue => { 23 | el.setAttribute("style", `width:${widthValue}`); 24 | const { width } = el.getBoundingClientRect(); 25 | el.removeAttribute("style"); 26 | return width; 27 | }; 28 | 29 | const initialWidth = measureEl(value); 30 | 31 | return { 32 | pxWidth: initialWidth, 33 | units: units.map(unit => { 34 | const measured = measureEl(`${initialWidth}${unit}`); 35 | return { 36 | name: unit, 37 | multiplier: measured / initialWidth 38 | }; 39 | }, []) 40 | }; 41 | }; 42 | 43 | const getUnits = async ({ input, width, height }) => { 44 | const browser = await puppeteer.launch(); 45 | const page = await browser.newPage(); 46 | await page.setViewport({ width, height }); 47 | const units = await page.evaluate(measureUnits, input, UNITS); 48 | await browser.close(); 49 | return units; 50 | }; 51 | 52 | module.exports = getUnits; 53 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Helps shorten units for cssbattle.dev 2 | 3 | ## Installation 4 | 5 | `yarn global add unit-golf` || `npm install --global unit-golf` 6 | 7 | ## Usage 8 | 9 | `$ unit-golf [VALUE_TO_CONVERT]` 10 | 11 | Where `VALUE_TO_CONVERT` is any whole or fractional number of the following units: 12 | 13 | `px, vw, vh, in, cm, mm, pt, pc, em, ex, q, ch` 14 | 15 | If the unit is ommitted (eg, `unit-golf 325`) it will default to pixels. 16 | 17 | ### Options 18 | 19 | #### `--tolerance` 20 | 21 | Maximum difference in pixels that will be considered a match for a value. Defaults to `0.5`. Decreasing will yield more exact but less concise results and vice versa. 22 | 23 | #### `--width` 24 | 25 | Viewport width for the purpose of calculating vw units. Defaults to `400`, which is what cssbattle currently uses. 26 | 27 | #### `--height` 28 | 29 | Viewport height for the purpose of calculating vh units. Defaults to `300`, which is what cssbattle currently uses. 30 | 31 | ### Examples 32 | 33 | ``` 34 | $ unit-golf 57.3vw 35 | 36 | ⛳ 32ex (-0.19px) 37 | 38 | 172pt (+0.14px) 39 | 229px (-0.19px) 40 | 57.3vw (+0.01px) 41 | 76.4vh (+0.01px) 42 | 242.6q (+0.03px) 43 | 6.06cm (-0.15px) 44 | 60.6mm (-0.15px) 45 | 28.65ch (+0.01px) 46 | 14.32pc (-0.07px) 47 | 14.32em (-0.07px) 48 | 2.39in (+0.25px) 49 | ``` 50 | 51 | ``` 52 | $ unit-golf 57.3vw --tolerance 0 53 | 54 | ⛳ 242.57q 55 | 56 | 60.64mm 57 | 171.89pt 58 | ... 59 | ``` 60 | 61 | Parens indicate how many pixels off each suggestion is from the target. 62 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | const getUnitsAndPxWidth = require("./get-units-and-px-width"); 2 | 3 | const clampPrecision = (number, precision = 2) => { 4 | const pow = Math.pow(10, precision); 5 | return Number(Math.round(number * pow) / pow); 6 | }; 7 | 8 | const getUnitValues = (px, unit, unitValue) => { 9 | const { name, multiplier } = unit; 10 | unitValue = unitValue || clampPrecision(px / multiplier); 11 | const pixelOffset = clampPrecision(unitValue * multiplier - px); 12 | return { 13 | unitValue, 14 | string: `${unitValue}${name}`.replace(/^0./, "."), 15 | pixelOffset 16 | }; 17 | }; 18 | 19 | const findBestUnitValue = (px, tolerance) => unit => { 20 | let result = getUnitValues(px, unit); 21 | const { unitValue } = result; 22 | 23 | if (!Number.isInteger(unitValue, tolerance)) { 24 | for (let i = unitValue.toString().split(".")[1].length - 1; i >= 0; i--) { 25 | const newUnitValue = clampPrecision(unitValue, i); 26 | const newResult = getUnitValues(px, unit, newUnitValue); 27 | const { pixelOffset } = newResult; 28 | if (Math.abs(pixelOffset) <= tolerance) { 29 | result = newResult; 30 | } 31 | } 32 | } 33 | 34 | return result; 35 | }; 36 | 37 | const convertAndSort = (px, units, tolerance) => { 38 | return units.map(findBestUnitValue(px, tolerance)).sort((a, b) => { 39 | const [lnA, lnB] = [a, b].map(item => item.string.length); 40 | const [offsetA, offsetB] = [a.pixelOffset, b.pixelOffset].map(Math.abs); 41 | const lnDiff = lnA - lnB; 42 | if (offsetA > tolerance) return 1; 43 | if (lnDiff === 0) return offsetA - offsetB; 44 | return lnDiff; 45 | }); 46 | }; 47 | 48 | const unitGolf = ({ input, tolerance = 0.2, width = 400, height = 300 }) => { 49 | return getUnitsAndPxWidth({ input, width, height }).then( 50 | ({ units, pxWidth }) => { 51 | return convertAndSort(pxWidth, units, tolerance); 52 | } 53 | ); 54 | }; 55 | 56 | module.exports = unitGolf; 57 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | agent-base@^4.1.0: 6 | version "4.2.1" 7 | resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-4.2.1.tgz#d89e5999f797875674c07d87f260fc41e83e8ca9" 8 | dependencies: 9 | es6-promisify "^5.0.0" 10 | 11 | ansi-regex@^4.1.0: 12 | version "4.1.0" 13 | resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" 14 | 15 | ansi-styles@^3.2.1: 16 | version "3.2.1" 17 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" 18 | dependencies: 19 | color-convert "^1.9.0" 20 | 21 | async-limiter@~1.0.0: 22 | version "1.0.0" 23 | resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" 24 | 25 | balanced-match@^1.0.0: 26 | version "1.0.0" 27 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 28 | 29 | brace-expansion@^1.1.7: 30 | version "1.1.11" 31 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 32 | dependencies: 33 | balanced-match "^1.0.0" 34 | concat-map "0.0.1" 35 | 36 | buffer-from@^1.0.0: 37 | version "1.1.1" 38 | resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef" 39 | 40 | chalk@^2.0.1, chalk@^2.4.2: 41 | version "2.4.2" 42 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" 43 | dependencies: 44 | ansi-styles "^3.2.1" 45 | escape-string-regexp "^1.0.5" 46 | supports-color "^5.3.0" 47 | 48 | cli-cursor@^2.1.0: 49 | version "2.1.0" 50 | resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" 51 | dependencies: 52 | restore-cursor "^2.0.0" 53 | 54 | cli-spinners@^2.0.0: 55 | version "2.1.0" 56 | resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-2.1.0.tgz#22c34b4d51f573240885b201efda4e4ec9fff3c7" 57 | 58 | clone@^1.0.2: 59 | version "1.0.4" 60 | resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" 61 | 62 | color-convert@^1.9.0: 63 | version "1.9.3" 64 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" 65 | dependencies: 66 | color-name "1.1.3" 67 | 68 | color-name@1.1.3: 69 | version "1.1.3" 70 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 71 | 72 | concat-map@0.0.1: 73 | version "0.0.1" 74 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 75 | 76 | concat-stream@1.6.2: 77 | version "1.6.2" 78 | resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34" 79 | dependencies: 80 | buffer-from "^1.0.0" 81 | inherits "^2.0.3" 82 | readable-stream "^2.2.2" 83 | typedarray "^0.0.6" 84 | 85 | core-util-is@~1.0.0: 86 | version "1.0.2" 87 | resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7" 88 | 89 | debug@2.6.9: 90 | version "2.6.9" 91 | resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" 92 | dependencies: 93 | ms "2.0.0" 94 | 95 | debug@^3.1.0: 96 | version "3.2.6" 97 | resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" 98 | dependencies: 99 | ms "^2.1.1" 100 | 101 | debug@^4.1.0: 102 | version "4.1.1" 103 | resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" 104 | dependencies: 105 | ms "^2.1.1" 106 | 107 | defaults@^1.0.3: 108 | version "1.0.3" 109 | resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d" 110 | dependencies: 111 | clone "^1.0.2" 112 | 113 | es6-promise@^4.0.3: 114 | version "4.2.6" 115 | resolved "https://registry.yarnpkg.com/es6-promise/-/es6-promise-4.2.6.tgz#b685edd8258886365ea62b57d30de28fadcd974f" 116 | 117 | es6-promisify@^5.0.0: 118 | version "5.0.0" 119 | resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-5.0.0.tgz#5109d62f3e56ea967c4b63505aef08291c8a5203" 120 | dependencies: 121 | es6-promise "^4.0.3" 122 | 123 | escape-string-regexp@^1.0.5: 124 | version "1.0.5" 125 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 126 | 127 | extract-zip@^1.6.6: 128 | version "1.6.7" 129 | resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.6.7.tgz#a840b4b8af6403264c8db57f4f1a74333ef81fe9" 130 | dependencies: 131 | concat-stream "1.6.2" 132 | debug "2.6.9" 133 | mkdirp "0.5.1" 134 | yauzl "2.4.1" 135 | 136 | fd-slicer@~1.0.1: 137 | version "1.0.1" 138 | resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.0.1.tgz#8b5bcbd9ec327c5041bf9ab023fd6750f1177e65" 139 | dependencies: 140 | pend "~1.2.0" 141 | 142 | fs.realpath@^1.0.0: 143 | version "1.0.0" 144 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 145 | 146 | glob@^7.1.3: 147 | version "7.1.3" 148 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.3.tgz#3960832d3f1574108342dafd3a67b332c0969df1" 149 | dependencies: 150 | fs.realpath "^1.0.0" 151 | inflight "^1.0.4" 152 | inherits "2" 153 | minimatch "^3.0.4" 154 | once "^1.3.0" 155 | path-is-absolute "^1.0.0" 156 | 157 | has-flag@^3.0.0: 158 | version "3.0.0" 159 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" 160 | 161 | https-proxy-agent@^2.2.1: 162 | version "2.2.1" 163 | resolved "https://registry.yarnpkg.com/https-proxy-agent/-/https-proxy-agent-2.2.1.tgz#51552970fa04d723e04c56d04178c3f92592bbc0" 164 | dependencies: 165 | agent-base "^4.1.0" 166 | debug "^3.1.0" 167 | 168 | inflight@^1.0.4: 169 | version "1.0.6" 170 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 171 | dependencies: 172 | once "^1.3.0" 173 | wrappy "1" 174 | 175 | inherits@2, inherits@^2.0.3, inherits@~2.0.3: 176 | version "2.0.3" 177 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de" 178 | 179 | isarray@~1.0.0: 180 | version "1.0.0" 181 | resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11" 182 | 183 | log-symbols@^2.2.0: 184 | version "2.2.0" 185 | resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a" 186 | dependencies: 187 | chalk "^2.0.1" 188 | 189 | mime@^2.0.3: 190 | version "2.4.2" 191 | resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.2.tgz#ce5229a5e99ffc313abac806b482c10e7ba6ac78" 192 | 193 | mimic-fn@^1.0.0: 194 | version "1.2.0" 195 | resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" 196 | 197 | minimatch@^3.0.4: 198 | version "3.0.4" 199 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 200 | dependencies: 201 | brace-expansion "^1.1.7" 202 | 203 | minimist@0.0.8: 204 | version "0.0.8" 205 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" 206 | 207 | minimist@^1.2.0: 208 | version "1.2.0" 209 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" 210 | 211 | mkdirp@0.5.1: 212 | version "0.5.1" 213 | resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.1.tgz#30057438eac6cf7f8c4767f38648d6697d75c903" 214 | dependencies: 215 | minimist "0.0.8" 216 | 217 | ms@2.0.0: 218 | version "2.0.0" 219 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" 220 | 221 | ms@^2.1.1: 222 | version "2.1.1" 223 | resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" 224 | 225 | once@^1.3.0: 226 | version "1.4.0" 227 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 228 | dependencies: 229 | wrappy "1" 230 | 231 | onetime@^2.0.0: 232 | version "2.0.1" 233 | resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" 234 | dependencies: 235 | mimic-fn "^1.0.0" 236 | 237 | ora@^3.4.0: 238 | version "3.4.0" 239 | resolved "https://registry.yarnpkg.com/ora/-/ora-3.4.0.tgz#bf0752491059a3ef3ed4c85097531de9fdbcd318" 240 | dependencies: 241 | chalk "^2.4.2" 242 | cli-cursor "^2.1.0" 243 | cli-spinners "^2.0.0" 244 | log-symbols "^2.2.0" 245 | strip-ansi "^5.2.0" 246 | wcwidth "^1.0.1" 247 | 248 | path-is-absolute@^1.0.0: 249 | version "1.0.1" 250 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 251 | 252 | pend@~1.2.0: 253 | version "1.2.0" 254 | resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50" 255 | 256 | process-nextick-args@~2.0.0: 257 | version "2.0.0" 258 | resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.0.tgz#a37d732f4271b4ab1ad070d35508e8290788ffaa" 259 | 260 | progress@^2.0.1: 261 | version "2.0.3" 262 | resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" 263 | 264 | proxy-from-env@^1.0.0: 265 | version "1.0.0" 266 | resolved "https://registry.yarnpkg.com/proxy-from-env/-/proxy-from-env-1.0.0.tgz#33c50398f70ea7eb96d21f7b817630a55791c7ee" 267 | 268 | puppeteer@^1.14.0: 269 | version "1.14.0" 270 | resolved "https://registry.yarnpkg.com/puppeteer/-/puppeteer-1.14.0.tgz#828c1926b307200d5fc8289b99df4e13e962d339" 271 | dependencies: 272 | debug "^4.1.0" 273 | extract-zip "^1.6.6" 274 | https-proxy-agent "^2.2.1" 275 | mime "^2.0.3" 276 | progress "^2.0.1" 277 | proxy-from-env "^1.0.0" 278 | rimraf "^2.6.1" 279 | ws "^6.1.0" 280 | 281 | readable-stream@^2.2.2: 282 | version "2.3.6" 283 | resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" 284 | dependencies: 285 | core-util-is "~1.0.0" 286 | inherits "~2.0.3" 287 | isarray "~1.0.0" 288 | process-nextick-args "~2.0.0" 289 | safe-buffer "~5.1.1" 290 | string_decoder "~1.1.1" 291 | util-deprecate "~1.0.1" 292 | 293 | restore-cursor@^2.0.0: 294 | version "2.0.0" 295 | resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" 296 | dependencies: 297 | onetime "^2.0.0" 298 | signal-exit "^3.0.2" 299 | 300 | rimraf@^2.6.1: 301 | version "2.6.3" 302 | resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" 303 | dependencies: 304 | glob "^7.1.3" 305 | 306 | safe-buffer@~5.1.0, safe-buffer@~5.1.1: 307 | version "5.1.2" 308 | resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d" 309 | 310 | signal-exit@^3.0.2: 311 | version "3.0.2" 312 | resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" 313 | 314 | string_decoder@~1.1.1: 315 | version "1.1.1" 316 | resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8" 317 | dependencies: 318 | safe-buffer "~5.1.0" 319 | 320 | strip-ansi@^5.2.0: 321 | version "5.2.0" 322 | resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" 323 | dependencies: 324 | ansi-regex "^4.1.0" 325 | 326 | supports-color@^5.3.0: 327 | version "5.5.0" 328 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" 329 | dependencies: 330 | has-flag "^3.0.0" 331 | 332 | typedarray@^0.0.6: 333 | version "0.0.6" 334 | resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" 335 | 336 | util-deprecate@~1.0.1: 337 | version "1.0.2" 338 | resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" 339 | 340 | wcwidth@^1.0.1: 341 | version "1.0.1" 342 | resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8" 343 | dependencies: 344 | defaults "^1.0.3" 345 | 346 | wrappy@1: 347 | version "1.0.2" 348 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 349 | 350 | ws@^6.1.0: 351 | version "6.2.1" 352 | resolved "https://registry.yarnpkg.com/ws/-/ws-6.2.1.tgz#442fdf0a47ed64f59b6a5d8ff130f4748ed524fb" 353 | dependencies: 354 | async-limiter "~1.0.0" 355 | 356 | yauzl@2.4.1: 357 | version "2.4.1" 358 | resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" 359 | dependencies: 360 | fd-slicer "~1.0.1" 361 | --------------------------------------------------------------------------------