Skip to content

Commit 8085be3

Browse files
committedJan 8, 2018
icss-replace-symbols -> icss-utils
1 parent 51cb1fc commit 8085be3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed
 

‎index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import postcss from 'postcss';
22
import path from 'path';
33
import promisify from 'es6-promisify';
44
import { CachedInputFileSystem, NodeJsInputFileSystem, ResolverFactory } from 'enhanced-resolve';
5-
import replaceSymbols, { replaceAll } from 'icss-replace-symbols';
5+
import { replaceSymbols, replaceValueSymbols } from 'icss-utils';
66

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

2929
if (!requiredDefinitions) {
3030
// eslint-disable-next-line no-param-reassign

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"@ava/babel-preset-stage-4": "^1.0.0",
2525
"enhanced-resolve": "^3.1.0",
2626
"es6-promisify": "^5.0.0",
27-
"icss-replace-symbols": "^1.0.2",
27+
"icss-utils": "^3.0.1",
2828
"postcss": "^6.0.1"
2929
},
3030
"devDependencies": {

0 commit comments

Comments
 (0)
Please sign in to comment.