(file)
| 47 | |
| 48 | // Parse variables from a file with postcss. |
| 49 | function getVars(file) { |
| 50 | let contents = fs.readFileSync(file, 'utf8'); |
| 51 | let root = postcss.parse(contents); |
| 52 | |
| 53 | let vars = {}; |
| 54 | root.walkRules(rule => { |
| 55 | rule.walkDecls(decl => { |
| 56 | if (customPropertyRegExp.test(decl.prop)) { |
| 57 | vars[decl.prop] = decl.value; |
| 58 | } |
| 59 | }); |
| 60 | }); |
| 61 | |
| 62 | return vars; |
| 63 | } |
| 64 | |
| 65 | let globals = getVars(`${__dirname}/../packages/@adobe/spectrum-css-temp/vars/spectrum-global.css`); |
| 66 | let theme = getVars(`${__dirname}/../packages/@adobe/spectrum-css-temp/vars/spectrum-light.css`); |
no test coverage detected