├── .editorconfig ├── .gitignore ├── .travis.yml ├── LICENSE ├── changelog.md ├── index.js ├── package.json ├── readme.md ├── test ├── fixtures │ ├── atrule │ │ ├── custom-properties.css │ │ ├── custom-properties.out.css │ │ ├── multiple-selector.css │ │ ├── multiple-selector.out.css │ │ ├── nested-media-selector.css │ │ ├── nested-media-selector.out.css │ │ ├── nested-selector.css │ │ ├── nested-selector.out.css │ │ ├── same-rules.css │ │ ├── same-rules.out.css │ │ ├── simple.css │ │ ├── simple.out.css │ │ ├── specify-property.css │ │ └── specify-property.out.css │ └── function │ │ ├── custom-properties.css │ │ ├── custom-properties.out.css │ │ ├── multiple-selector.css │ │ ├── multiple-selector.out.css │ │ ├── nested-call.css │ │ ├── nested-call.out.css │ │ ├── nested-media-selector.css │ │ ├── nested-media-selector.out.css │ │ ├── nested-selector.css │ │ ├── nested-selector.out.css │ │ ├── same-rules.css │ │ ├── same-rules.out.css │ │ ├── simple.css │ │ ├── simple.out.css │ │ ├── specify-property.css │ │ └── specify-property.out.css └── index.js └── yarn.lock /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | end_of_line = lf 7 | indent_size = 4 8 | indent_style = space 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [{package.json,*.css}] 13 | indent_size = 2 14 | 15 | [*.md] 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: false 2 | language: node_js 3 | node_js: 4 | - "6" 5 | - "8" 6 | - "10" 7 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | This software is released under the MIT license: 2 | 3 | Copyright (c) 2016 Masaaki Morishita 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | 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, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.)) 21 | -------------------------------------------------------------------------------- /changelog.md: -------------------------------------------------------------------------------- 1 | ## v2.0.0 2 | 3 | - Use PostCSS v7. 4 | 5 | ## v1.2.1 6 | 7 | - Fix nested function call [#8](https://github.com/morishitter/postcss-ref/pull/9) 8 | 9 | ## v1.2.0 10 | 11 | - Added [#8](https://github.com/morishitter/postcss-ref/pull/8) 12 | 13 | ## v1.1.1 14 | 15 | - Fixed [#7](https://github.com/morishitter/postcss-ref/pull/7) 16 | 17 | ## v1.1.0 18 | 19 | - Added [#2](https://github.com/morishitter/postcss-ref/issues/2) 20 | - Added [#5](https://github.com/morishitter/postcss-ref/issues/5) 21 | 22 | ## v1.0.1 23 | 24 | - Fixed [#1](https://github.com/morishitter/postcss-ref/issues/1). 25 | 26 | ## v1.0.0 27 | 28 | Initial release. 29 | -------------------------------------------------------------------------------- /index.js: -------------------------------------------------------------------------------- 1 | var postcss = require('postcss') 2 | 3 | module.exports = postcss.plugin('postcss-ref', function (opts) { 4 | opts = opts || { atRule: true } 5 | 6 | return function (root) { 7 | if (opts.atRule) { 8 | root.walkAtRules('ref', function (atrule) { 9 | var params = atrule.params.split(',') 10 | var selector = params[0].trim() 11 | var refedProperty = params[1].trim() 12 | var newProperty = params.length === 3 ? params[2].trim() : refedProperty 13 | 14 | var newValue 15 | if (selector.indexOf('@media') >= 0) { 16 | root.walkAtRules('media', function(rule) { 17 | rule.walkDecls(refedProperty, function (decl) { 18 | newValue = decl.value 19 | 20 | if (isCustomProperty(refedProperty)) { 21 | newValue = 'var(' + refedProperty + ')' 22 | } 23 | }) 24 | }) 25 | } else { 26 | root.walkRules(new RegExp(selector), function (rule) { 27 | rule.walkDecls(refedProperty, function (decl) { 28 | newValue = decl.value 29 | 30 | if (isCustomProperty(refedProperty)) { 31 | newValue = 'var(' + refedProperty + ')' 32 | } 33 | }) 34 | }) 35 | } 36 | 37 | if (atrule.parent.type === 'rule') { 38 | atrule.parent.insertBefore(atrule, { 39 | prop: newProperty, 40 | value: newValue 41 | }) 42 | } 43 | 44 | atrule.remove() 45 | }) 46 | } else { 47 | var mediaRuleCache = {} 48 | var ruleCache = {} 49 | var refCache = [] 50 | 51 | root.walk(function (node) { 52 | var type = node.type 53 | 54 | if (type === 'atrule') { 55 | if (node.name === 'media') { 56 | node.nodes.forEach(function(mediaNode) { 57 | mediaRuleCache['@media ' + node.params + ' ' + mediaNode.selector] = mediaNode 58 | }) 59 | } 60 | } else if (type === 'rule') { 61 | if (node.parent.type !== 'atrule') { 62 | ruleCache[node.selector] = node 63 | } 64 | } else if (type === 'decl') { 65 | if (node.value.indexOf('ref(') !== -1) { 66 | refCache.push(node) 67 | } 68 | } 69 | }) 70 | 71 | refCache.forEach(function(decl) { 72 | var match = decl.value.match(/ref\((.*), ([^\)]*)\)/) 73 | var selector = match[1] 74 | var refedProperty = match[2] 75 | 76 | var wantedSelector = 77 | selector.indexOf('@media') >= 0 78 | ? mediaRuleCache[selector] 79 | : ruleCache[ 80 | Object.keys(ruleCache).find(function(rule) { 81 | return new RegExp(selector).test(rule) 82 | }) 83 | ] 84 | 85 | wantedSelector.nodes.forEach(function(node) { 86 | if (node.prop === refedProperty) { 87 | newValue = node.value 88 | 89 | if (isCustomProperty(refedProperty)) { 90 | newValue = 'var(' + refedProperty + ')' 91 | } 92 | } 93 | }) 94 | 95 | decl.value = decl.value.replace(match[0], newValue) 96 | }) 97 | } 98 | } 99 | }) 100 | 101 | function isCustomProperty(property) { 102 | return /^--/.test(property) 103 | } 104 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "postcss-ref", 3 | "version": "2.0.0", 4 | "description": "PostCSS plugin to refer properties from another rule (@ref rule)", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "tape test" 8 | }, 9 | "repository": { 10 | "type": "git", 11 | "url": "git://github.com/morishitter/postcss-ref/git" 12 | }, 13 | "keywords": [ 14 | "css", 15 | "postcss", 16 | "postcss-plugin" 17 | ], 18 | "author": "Masaaki Morishita", 19 | "license": "MIT", 20 | "dependencies": { 21 | "postcss": "^7.0.17" 22 | }, 23 | "devDependencies": { 24 | "tape": "^4.11.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # postcss-ref [![Build Status](https://travis-ci.org/morishitter/postcss-ref.svg)](https://travis-ci.org/morishitter/postcss-ref) 2 | 3 | PostCSS plugin to refer properties from another rule (@ref rule) 4 | 5 | ## Spec 6 | 7 | ### Abstract 8 | 9 | This specification defines the @ref rule, which allows an author to refer properties in another style rule. 10 | 11 | ### Using @ref rule 12 | 13 | ``` 14 | @ref = @ref , ( ,) 15 | ``` 16 | 17 | #### Example 18 | 19 | ```css 20 | .foo { 21 | font-size: 12px; 22 | color: #333; 23 | } 24 | 25 | .bar { 26 | @ref .foo, font-size; 27 | color: #444; 28 | } 29 | ``` 30 | 31 | ### `ref()` notation (with `atRule` option) 32 | 33 | You can pass an option to `postcss-ref` which lets you use `ref` as a function (`ref()`) instead of an atRule (`@ref`) 34 | 35 | ``` 36 | ref() = ref(, ) 37 | ``` 38 | 39 | #### Example 40 | ```css 41 | .foo { 42 | font-size: 12px; 43 | color: #333; 44 | } 45 | 46 | .bar { 47 | font-size: ref(.foo, font-size); 48 | color: #444; 49 | } 50 | ``` 51 | 52 | ### with media queries 53 | 54 | It also works with @media rules 55 | 56 | ```css 57 | .foo { 58 | font-size: 10px; 59 | } 60 | 61 | @media (min-width: 1602px) { 62 | .foo { 63 | font-size: 12px; 64 | color: #333; 65 | } 66 | } 67 | 68 | .bar { 69 | @ref @media (min-width: 1602px) .foo, font-size; 70 | } 71 | ``` 72 | 73 | or 74 | 75 | ```css 76 | .bar { 77 | font-size: ref(@media (min-width: 1602px) .foo, font-size); 78 | } 79 | ``` 80 | 81 | This allows you to be more verbose with what you are doing. 82 | 83 | ## Installation 84 | 85 | ```shell 86 | $ npm install postcss-ref 87 | ``` 88 | 89 | ## How to use postcss-ref 90 | 91 | ### in Node.js 92 | 93 | ```js 94 | // dependencies 95 | var fs = require("fs") 96 | var postcss = require("postcss") 97 | var ref = require("postcss-ref") 98 | 99 | // css to be processed 100 | var css = fs.readFileSync("input.css", "utf8") 101 | 102 | // process css 103 | var output = postcss() 104 | .use(ref()) // If using the function way change it to `ref({ atRule: false })` 105 | .process(css) 106 | .css 107 | ``` 108 | 109 | ## Example 110 | 111 | Input: 112 | 113 | ```css 114 | .foo { 115 | font-size: 12px; 116 | color: #333; 117 | } 118 | 119 | .bar { 120 | @ref .foo, font-size; 121 | color: #444; 122 | } 123 | ``` 124 | 125 | Output: 126 | 127 | ```css 128 | .foo { 129 | font-size: 12px; 130 | color: #333; 131 | } 132 | 133 | .bar { 134 | font-size: 12px; 135 | color: #444; 136 | } 137 | ``` 138 | 139 | ### Works well with custom properties 140 | 141 | Input: 142 | 143 | ```css 144 | .foo { 145 | --font-m: 12px; 146 | color: #333; 147 | } 148 | 149 | .bar { 150 | @ref .foo, --font-m, font-size; 151 | } 152 | ``` 153 | 154 | Output: 155 | 156 | ```css 157 | .foo { 158 | --font-m: 12px; 159 | color: #333; 160 | } 161 | 162 | .bar { 163 | font-size: var(--font-m); 164 | } 165 | ``` 166 | 167 | Input: 168 | 169 | ```css 170 | .foo { 171 | --font-m: 12px; 172 | color: #333; 173 | } 174 | 175 | .bar { 176 | font-size: ref(.foo, --font-m); 177 | } 178 | ``` 179 | 180 | Output: 181 | 182 | ```css 183 | .foo { 184 | --font-m: 12px; 185 | color: #333; 186 | } 187 | 188 | .bar { 189 | font-size: var(--font-m); 190 | } 191 | ``` 192 | 193 | ## License 194 | 195 | The MIT License (MIT) 196 | 197 | Copyright (c) 2016 Masaaki Morishita 198 | -------------------------------------------------------------------------------- /test/fixtures/atrule/custom-properties.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | --font-m: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | @ref .foo, --font-m, font-size; 8 | } 9 | -------------------------------------------------------------------------------- /test/fixtures/atrule/custom-properties.out.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | --font-m: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | font-size: var(--font-m); 8 | } 9 | -------------------------------------------------------------------------------- /test/fixtures/atrule/multiple-selector.css: -------------------------------------------------------------------------------- 1 | .foo, .foo1 { 2 | font-size: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | @ref .foo, font-size; 8 | color: #444; 9 | } 10 | -------------------------------------------------------------------------------- /test/fixtures/atrule/multiple-selector.out.css: -------------------------------------------------------------------------------- 1 | .foo, .foo1 { 2 | font-size: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | font-size: 12px; 8 | color: #444; 9 | } 10 | -------------------------------------------------------------------------------- /test/fixtures/atrule/nested-media-selector.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 10px; 3 | } 4 | 5 | @media (min-width: 1602px) { 6 | .foo { 7 | font-size: 12px; 8 | color: #333; 9 | } 10 | } 11 | 12 | .bar { 13 | @ref @media (min-width: 1602px) .foo, font-size; 14 | } 15 | -------------------------------------------------------------------------------- /test/fixtures/atrule/nested-media-selector.out.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 10px; 3 | } 4 | 5 | @media (min-width: 1602px) { 6 | .foo { 7 | font-size: 12px; 8 | color: #333; 9 | } 10 | } 11 | 12 | .bar { 13 | font-size: 12px; 14 | } 15 | -------------------------------------------------------------------------------- /test/fixtures/atrule/nested-selector.css: -------------------------------------------------------------------------------- 1 | .foo > .nested { 2 | font-size: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | @ref .foo > .nested, font-size; 8 | } 9 | -------------------------------------------------------------------------------- /test/fixtures/atrule/nested-selector.out.css: -------------------------------------------------------------------------------- 1 | .foo > .nested { 2 | font-size: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | font-size: 12px; 8 | } 9 | -------------------------------------------------------------------------------- /test/fixtures/atrule/same-rules.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 12px; 3 | } 4 | 5 | .foo { 6 | font-size: 14px; 7 | color: #333; 8 | } 9 | 10 | .bar { 11 | @ref .foo, font-size, font-size; 12 | } 13 | -------------------------------------------------------------------------------- /test/fixtures/atrule/same-rules.out.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 12px; 3 | } 4 | 5 | .foo { 6 | font-size: 14px; 7 | color: #333; 8 | } 9 | 10 | .bar { 11 | font-size: 14px; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /test/fixtures/atrule/simple.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | @ref .foo, font-size; 8 | color: #444; 9 | } 10 | -------------------------------------------------------------------------------- /test/fixtures/atrule/simple.out.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | font-size: 12px; 8 | color: #444; 9 | } 10 | -------------------------------------------------------------------------------- /test/fixtures/atrule/specify-property.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 12px; 3 | color: #444; 4 | } 5 | 6 | .bar { 7 | color: #fff; 8 | @ref .foo, color, background-color; 9 | } 10 | -------------------------------------------------------------------------------- /test/fixtures/atrule/specify-property.out.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 12px; 3 | color: #444; 4 | } 5 | 6 | .bar { 7 | color: #fff; 8 | background-color: #444; 9 | } 10 | 11 | -------------------------------------------------------------------------------- /test/fixtures/function/custom-properties.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | --font-m: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | font-size: ref(.foo, --font-m); 8 | } 9 | -------------------------------------------------------------------------------- /test/fixtures/function/custom-properties.out.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | --font-m: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | font-size: var(--font-m); 8 | } 9 | -------------------------------------------------------------------------------- /test/fixtures/function/multiple-selector.css: -------------------------------------------------------------------------------- 1 | .foo, .foo1 { 2 | font-size: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | font-size: ref(.foo, font-size); 8 | color: #444; 9 | } 10 | -------------------------------------------------------------------------------- /test/fixtures/function/multiple-selector.out.css: -------------------------------------------------------------------------------- 1 | .foo, .foo1 { 2 | font-size: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | font-size: 12px; 8 | color: #444; 9 | } 10 | -------------------------------------------------------------------------------- /test/fixtures/function/nested-call.css: -------------------------------------------------------------------------------- 1 | .tooltip { 2 | background-color: #ccc; 3 | } 4 | 5 | .tooltip-marker { 6 | background-image: svg-load("marker.svg", fill: ref(.tooltip, background-color)); 7 | } 8 | -------------------------------------------------------------------------------- /test/fixtures/function/nested-call.out.css: -------------------------------------------------------------------------------- 1 | .tooltip { 2 | background-color: #ccc; 3 | } 4 | 5 | .tooltip-marker { 6 | background-image: svg-load("marker.svg", fill: #ccc); 7 | } 8 | -------------------------------------------------------------------------------- /test/fixtures/function/nested-media-selector.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 10px; 3 | } 4 | 5 | @media (min-width: 1602px) { 6 | .foo { 7 | font-size: 12px; 8 | color: #333; 9 | } 10 | } 11 | 12 | .bar { 13 | font-size: ref(@media (min-width: 1602px) .foo, font-size); 14 | } 15 | -------------------------------------------------------------------------------- /test/fixtures/function/nested-media-selector.out.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 10px; 3 | } 4 | 5 | @media (min-width: 1602px) { 6 | .foo { 7 | font-size: 12px; 8 | color: #333; 9 | } 10 | } 11 | 12 | .bar { 13 | font-size: 12px; 14 | } 15 | -------------------------------------------------------------------------------- /test/fixtures/function/nested-selector.css: -------------------------------------------------------------------------------- 1 | .foo > .nested { 2 | font-size: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | font-size: ref(.foo > .nested, font-size); 8 | } 9 | -------------------------------------------------------------------------------- /test/fixtures/function/nested-selector.out.css: -------------------------------------------------------------------------------- 1 | .foo > .nested { 2 | font-size: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | font-size: 12px; 8 | } 9 | -------------------------------------------------------------------------------- /test/fixtures/function/same-rules.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 12px; 3 | } 4 | 5 | .foo { 6 | font-size: 14px; 7 | color: #333; 8 | } 9 | 10 | .bar { 11 | font-size: ref(.foo, font-size); 12 | } 13 | -------------------------------------------------------------------------------- /test/fixtures/function/same-rules.out.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 12px; 3 | } 4 | 5 | .foo { 6 | font-size: 14px; 7 | color: #333; 8 | } 9 | 10 | .bar { 11 | font-size: 14px; 12 | } 13 | 14 | -------------------------------------------------------------------------------- /test/fixtures/function/simple.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | font-size: ref(.foo, font-size); 8 | color: #444; 9 | } 10 | -------------------------------------------------------------------------------- /test/fixtures/function/simple.out.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 12px; 3 | color: #333; 4 | } 5 | 6 | .bar { 7 | font-size: 12px; 8 | color: #444; 9 | } 10 | -------------------------------------------------------------------------------- /test/fixtures/function/specify-property.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 12px; 3 | color: #444; 4 | } 5 | 6 | .bar { 7 | background-color: ref(.foo, color); 8 | color: #fff; 9 | } 10 | -------------------------------------------------------------------------------- /test/fixtures/function/specify-property.out.css: -------------------------------------------------------------------------------- 1 | .foo { 2 | font-size: 12px; 3 | color: #444; 4 | } 5 | 6 | .bar { 7 | background-color: #444; 8 | color: #fff; 9 | } 10 | -------------------------------------------------------------------------------- /test/index.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs') 2 | var test = require('tape') 3 | var postcss = require('postcss') 4 | var ref = require('..') 5 | 6 | function fixture (name, atRule) { 7 | var folder = atRule ? 'atrule/' : 'function/' 8 | 9 | return fs.readFileSync('test/fixtures/' + folder + name + '.css', 'utf-8').trim() 10 | } 11 | 12 | function output (name, atRule) { 13 | var folder = atRule ? 'atrule/' : 'function/' 14 | 15 | return fs.readFileSync('test/fixtures/' + folder + name + '.out.css', 'utf-8').trim() 16 | } 17 | 18 | function compare (name, atRule) { 19 | return test(name, function (t) { 20 | var res = postcss().use(ref({ atRule: atRule })).process(fixture(name, atRule)).css.trim() 21 | t.same(res, output(name, atRule)) 22 | t.end() 23 | }) 24 | } 25 | 26 | // At rules 27 | compare('simple', true) 28 | compare('same-rules', true) 29 | compare('specify-property', true) 30 | compare('custom-properties', true) 31 | compare('nested-selector', true) 32 | compare('nested-media-selector', true) 33 | compare('multiple-selector', true) 34 | 35 | // Functions 36 | compare('simple', false) 37 | compare('same-rules', false) 38 | compare('specify-property', false) 39 | compare('custom-properties', false) 40 | compare('nested-selector', false) 41 | compare('nested-media-selector', false) 42 | compare('multiple-selector', false) 43 | compare('nested-call', false); 44 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | # THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. 2 | # yarn lockfile v1 3 | 4 | 5 | ansi-styles@^3.2.1: 6 | version "3.2.1" 7 | resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d" 8 | integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA== 9 | dependencies: 10 | color-convert "^1.9.0" 11 | 12 | balanced-match@^1.0.0: 13 | version "1.0.0" 14 | resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" 15 | integrity sha1-ibTRmasr7kneFk6gK4nORi1xt2c= 16 | 17 | brace-expansion@^1.1.7: 18 | version "1.1.11" 19 | resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" 20 | integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== 21 | dependencies: 22 | balanced-match "^1.0.0" 23 | concat-map "0.0.1" 24 | 25 | chalk@^2.4.2: 26 | version "2.4.2" 27 | resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" 28 | integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== 29 | dependencies: 30 | ansi-styles "^3.2.1" 31 | escape-string-regexp "^1.0.5" 32 | supports-color "^5.3.0" 33 | 34 | color-convert@^1.9.0: 35 | version "1.9.3" 36 | resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8" 37 | integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg== 38 | dependencies: 39 | color-name "1.1.3" 40 | 41 | color-name@1.1.3: 42 | version "1.1.3" 43 | resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25" 44 | integrity sha1-p9BVi9icQveV3UIyj3QIMcpTvCU= 45 | 46 | concat-map@0.0.1: 47 | version "0.0.1" 48 | resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" 49 | integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= 50 | 51 | deep-equal@~1.0.1: 52 | version "1.0.1" 53 | resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.0.1.tgz#f5d260292b660e084eff4cdbc9f08ad3247448b5" 54 | integrity sha1-9dJgKStmDghO/0zbyfCK0yR0SLU= 55 | 56 | define-properties@^1.1.2: 57 | version "1.1.3" 58 | resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1" 59 | integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ== 60 | dependencies: 61 | object-keys "^1.0.12" 62 | 63 | defined@~1.0.0: 64 | version "1.0.0" 65 | resolved "https://registry.yarnpkg.com/defined/-/defined-1.0.0.tgz#c98d9bcef75674188e110969151199e39b1fa693" 66 | integrity sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM= 67 | 68 | es-abstract@^1.5.0: 69 | version "1.13.0" 70 | resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.13.0.tgz#ac86145fdd5099d8dd49558ccba2eaf9b88e24e9" 71 | integrity sha512-vDZfg/ykNxQVwup/8E1BZhVzFfBxs9NqMzGcvIJrqg5k2/5Za2bWo40dK2J1pgLngZ7c+Shh8lwYtLGyrwPutg== 72 | dependencies: 73 | es-to-primitive "^1.2.0" 74 | function-bind "^1.1.1" 75 | has "^1.0.3" 76 | is-callable "^1.1.4" 77 | is-regex "^1.0.4" 78 | object-keys "^1.0.12" 79 | 80 | es-to-primitive@^1.2.0: 81 | version "1.2.0" 82 | resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.0.tgz#edf72478033456e8dda8ef09e00ad9650707f377" 83 | integrity sha512-qZryBOJjV//LaxLTV6UC//WewneB3LcXOL9NP++ozKVXsIIIpm/2c13UDiD9Jp2eThsecw9m3jPqDwTyobcdbg== 84 | dependencies: 85 | is-callable "^1.1.4" 86 | is-date-object "^1.0.1" 87 | is-symbol "^1.0.2" 88 | 89 | escape-string-regexp@^1.0.5: 90 | version "1.0.5" 91 | resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" 92 | integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= 93 | 94 | for-each@~0.3.3: 95 | version "0.3.3" 96 | resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" 97 | integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== 98 | dependencies: 99 | is-callable "^1.1.3" 100 | 101 | fs.realpath@^1.0.0: 102 | version "1.0.0" 103 | resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" 104 | integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= 105 | 106 | function-bind@^1.0.2, function-bind@^1.1.1, function-bind@~1.1.1: 107 | version "1.1.1" 108 | resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" 109 | integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== 110 | 111 | glob@~7.1.4: 112 | version "7.1.4" 113 | resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" 114 | integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== 115 | dependencies: 116 | fs.realpath "^1.0.0" 117 | inflight "^1.0.4" 118 | inherits "2" 119 | minimatch "^3.0.4" 120 | once "^1.3.0" 121 | path-is-absolute "^1.0.0" 122 | 123 | has-flag@^3.0.0: 124 | version "3.0.0" 125 | resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" 126 | integrity sha1-tdRU3CGZriJWmfNGfloH87lVuv0= 127 | 128 | has-symbols@^1.0.0: 129 | version "1.0.0" 130 | resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.0.tgz#ba1a8f1af2a0fc39650f5c850367704122063b44" 131 | integrity sha1-uhqPGvKg/DllD1yFA2dwQSIGO0Q= 132 | 133 | has@^1.0.1, has@^1.0.3, has@~1.0.3: 134 | version "1.0.3" 135 | resolved "https://registry.yarnpkg.com/has/-/has-1.0.3.tgz#722d7cbfc1f6aa8241f16dd814e011e1f41e8796" 136 | integrity sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw== 137 | dependencies: 138 | function-bind "^1.1.1" 139 | 140 | inflight@^1.0.4: 141 | version "1.0.6" 142 | resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" 143 | integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= 144 | dependencies: 145 | once "^1.3.0" 146 | wrappy "1" 147 | 148 | inherits@2, inherits@~2.0.4: 149 | version "2.0.4" 150 | resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" 151 | integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== 152 | 153 | is-callable@^1.1.3, is-callable@^1.1.4: 154 | version "1.1.4" 155 | resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.1.4.tgz#1e1adf219e1eeb684d691f9d6a05ff0d30a24d75" 156 | integrity sha512-r5p9sxJjYnArLjObpjA4xu5EKI3CuKHkJXMhT7kwbpUyIFD1n5PMAsoPvWnvtZiNz7LjkYDRZhd7FlI0eMijEA== 157 | 158 | is-date-object@^1.0.1: 159 | version "1.0.1" 160 | resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.1.tgz#9aa20eb6aeebbff77fbd33e74ca01b33581d3a16" 161 | integrity sha1-mqIOtq7rv/d/vTPnTKAbM1gdOhY= 162 | 163 | is-regex@^1.0.4: 164 | version "1.0.4" 165 | resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.0.4.tgz#5517489b547091b0930e095654ced25ee97e9491" 166 | integrity sha1-VRdIm1RwkbCTDglWVM7SXul+lJE= 167 | dependencies: 168 | has "^1.0.1" 169 | 170 | is-symbol@^1.0.2: 171 | version "1.0.2" 172 | resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.2.tgz#a055f6ae57192caee329e7a860118b497a950f38" 173 | integrity sha512-HS8bZ9ox60yCJLH9snBpIwv9pYUAkcuLhSA1oero1UB5y9aiQpRA8y2ex945AOtCZL1lJDeIk3G5LthswI46Lw== 174 | dependencies: 175 | has-symbols "^1.0.0" 176 | 177 | minimatch@^3.0.4: 178 | version "3.0.4" 179 | resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" 180 | integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== 181 | dependencies: 182 | brace-expansion "^1.1.7" 183 | 184 | minimist@~1.2.0: 185 | version "1.2.0" 186 | resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284" 187 | integrity sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ= 188 | 189 | object-inspect@~1.6.0: 190 | version "1.6.0" 191 | resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.6.0.tgz#c70b6cbf72f274aab4c34c0c82f5167bf82cf15b" 192 | integrity sha512-GJzfBZ6DgDAmnuaM3104jR4s1Myxr3Y3zfIyN4z3UdqN69oSRacNK8UhnobDdC+7J2AHCjGwxQubNJfE70SXXQ== 193 | 194 | object-keys@^1.0.12: 195 | version "1.1.1" 196 | resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" 197 | integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== 198 | 199 | once@^1.3.0: 200 | version "1.4.0" 201 | resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" 202 | integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= 203 | dependencies: 204 | wrappy "1" 205 | 206 | path-is-absolute@^1.0.0: 207 | version "1.0.1" 208 | resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" 209 | integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= 210 | 211 | path-parse@^1.0.6: 212 | version "1.0.6" 213 | resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" 214 | integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== 215 | 216 | postcss@^7.0.17: 217 | version "7.0.17" 218 | resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.17.tgz#4da1bdff5322d4a0acaab4d87f3e782436bad31f" 219 | integrity sha512-546ZowA+KZ3OasvQZHsbuEpysvwTZNGJv9EfyCQdsIDltPSWHAeTQ5fQy/Npi2ZDtLI3zs7Ps/p6wThErhm9fQ== 220 | dependencies: 221 | chalk "^2.4.2" 222 | source-map "^0.6.1" 223 | supports-color "^6.1.0" 224 | 225 | resolve@~1.11.1: 226 | version "1.11.1" 227 | resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.11.1.tgz#ea10d8110376982fef578df8fc30b9ac30a07a3e" 228 | integrity sha512-vIpgF6wfuJOZI7KKKSP+HmiKggadPQAdsp5HiC1mvqnfp0gF1vdwgBWZIdrVft9pgqoMFQN+R7BSWZiBxx+BBw== 229 | dependencies: 230 | path-parse "^1.0.6" 231 | 232 | resumer@~0.0.0: 233 | version "0.0.0" 234 | resolved "https://registry.yarnpkg.com/resumer/-/resumer-0.0.0.tgz#f1e8f461e4064ba39e82af3cdc2a8c893d076759" 235 | integrity sha1-8ej0YeQGS6Oegq883CqMiT0HZ1k= 236 | dependencies: 237 | through "~2.3.4" 238 | 239 | source-map@^0.6.1: 240 | version "0.6.1" 241 | resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.6.1.tgz#74722af32e9614e9c287a8d0bbde48b5e2f1a263" 242 | integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== 243 | 244 | string.prototype.trim@~1.1.2: 245 | version "1.1.2" 246 | resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.1.2.tgz#d04de2c89e137f4d7d206f086b5ed2fae6be8cea" 247 | integrity sha1-0E3iyJ4Tf019IG8Ia17S+ua+jOo= 248 | dependencies: 249 | define-properties "^1.1.2" 250 | es-abstract "^1.5.0" 251 | function-bind "^1.0.2" 252 | 253 | supports-color@^5.3.0: 254 | version "5.5.0" 255 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" 256 | integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== 257 | dependencies: 258 | has-flag "^3.0.0" 259 | 260 | supports-color@^6.1.0: 261 | version "6.1.0" 262 | resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-6.1.0.tgz#0764abc69c63d5ac842dd4867e8d025e880df8f3" 263 | integrity sha512-qe1jfm1Mg7Nq/NSh6XE24gPXROEVsWHxC1LIx//XNlD9iw7YZQGjZNjYN7xGaEG6iKdA8EtNFW6R0gjnVXp+wQ== 264 | dependencies: 265 | has-flag "^3.0.0" 266 | 267 | tape@^4.11.0: 268 | version "4.11.0" 269 | resolved "https://registry.yarnpkg.com/tape/-/tape-4.11.0.tgz#63d41accd95e45a23a874473051c57fdbc58edc1" 270 | integrity sha512-yixvDMX7q7JIs/omJSzSZrqulOV51EC9dK8dM0TzImTIkHWfe2/kFyL5v+d9C+SrCMaICk59ujsqFAVidDqDaA== 271 | dependencies: 272 | deep-equal "~1.0.1" 273 | defined "~1.0.0" 274 | for-each "~0.3.3" 275 | function-bind "~1.1.1" 276 | glob "~7.1.4" 277 | has "~1.0.3" 278 | inherits "~2.0.4" 279 | minimist "~1.2.0" 280 | object-inspect "~1.6.0" 281 | resolve "~1.11.1" 282 | resumer "~0.0.0" 283 | string.prototype.trim "~1.1.2" 284 | through "~2.3.8" 285 | 286 | through@~2.3.4, through@~2.3.8: 287 | version "2.3.8" 288 | resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" 289 | integrity sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU= 290 | 291 | wrappy@1: 292 | version "1.0.2" 293 | resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" 294 | integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= 295 | --------------------------------------------------------------------------------