Skip to content

Commit

Permalink
icss-replace-symbols -> icss-utils
Browse files Browse the repository at this point in the history
  • Loading branch information
princed committed Jan 8, 2018
1 parent 51cb1fc commit 8085be3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions index.js
Expand Up @@ -2,7 +2,7 @@ import postcss from 'postcss';
import path from 'path';
import promisify from 'es6-promisify';
import { CachedInputFileSystem, NodeJsInputFileSystem, ResolverFactory } from 'enhanced-resolve';
import replaceSymbols, { replaceAll } from 'icss-replace-symbols';
import { replaceSymbols, replaceValueSymbols } from 'icss-utils';

const matchImports = /^(.+?|\([\s\S]+?\))\s+from\s+("[^"]*"|'[^']*'|[\w-]+)$/;
const matchValueDefinition = /(?:\s+|^)([\w-]+)(:?\s+)(.+?)(\s*)$/g;
Expand All @@ -24,7 +24,7 @@ const getDefinition = (atRule, existingDefinitions, requiredDefinitions) => {
while (matches = matchValueDefinition.exec(atRule.params)) {
const [/* match */, requiredName, middle, value, end] = matches;
// Add to the definitions, knowing that values can refer to each other
definition[requiredName] = replaceAll(existingDefinitions, value);
definition[requiredName] = replaceValueSymbols(value, existingDefinitions);

if (!requiredDefinitions) {
// eslint-disable-next-line no-param-reassign
Expand Down
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -24,7 +24,7 @@
"@ava/babel-preset-stage-4": "^1.0.0",
"enhanced-resolve": "^3.1.0",
"es6-promisify": "^5.0.0",
"icss-replace-symbols": "^1.0.2",
"icss-utils": "^3.0.1",
"postcss": "^6.0.1"
},
"devDependencies": {
Expand Down

0 comments on commit 8085be3

Please sign in to comment.