aliascss 1.4.3 → 1.4.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/aliascss.config.js +2 -2
- package/dist/aliascss.js +1 -1
- package/lib/classPrinter.js +3 -1
- package/lib/node/compileFile.js +3 -1
- package/package.json +1 -1
package/lib/classPrinter.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { compiler as statementMaker } from './returnStatement.js';
|
|
2
2
|
import config from './config.js';
|
|
3
|
+
import { splitByCommaOutsideParens } from './utils/helper.js';
|
|
3
4
|
// import mapRawAttributeNames from './utils/browser-helper.js';
|
|
4
5
|
export default statementMaker;
|
|
5
6
|
export let classPrinter = {
|
|
@@ -93,7 +94,8 @@ export let classPrinter = {
|
|
|
93
94
|
split.forEach((each) => {
|
|
94
95
|
try {
|
|
95
96
|
const [at, pNv] = each.replace(/\]\[/, ']-[').replace("-", "=").split("=");
|
|
96
|
-
const result
|
|
97
|
+
// const result=returnPnV(pNv.replace(/^\[|\]$/g,'').split(','));
|
|
98
|
+
const result = returnPnV(splitByCommaOutsideParens(pNv.replace(/^\[|\]$/g, '')));
|
|
97
99
|
kfStatement += ` ${at.replace('@', '').replace(/:/g, ',').replace(/,/g, "%,").replace(/[\[|\]]/g, '')}% {${result ? result : ''}}`;
|
|
98
100
|
}
|
|
99
101
|
catch (error) {
|
package/lib/node/compileFile.js
CHANGED
|
@@ -9,6 +9,7 @@ import postcssDiscardDuplicates from 'postcss-discard-duplicates';
|
|
|
9
9
|
import cssnano from 'cssnano';
|
|
10
10
|
import chokidar from 'chokidar';
|
|
11
11
|
import sortMediaQueries from 'postcss-sort-media-queries';
|
|
12
|
+
import { splitByCommaOutsideParens } from '../utils/helper.js';
|
|
12
13
|
const init = {
|
|
13
14
|
classList: [], // hold className for MasterCSS to avoid repeating
|
|
14
15
|
groups: [],
|
|
@@ -133,7 +134,8 @@ export function keyframesStatement(name, timeLine, statementMaker) {
|
|
|
133
134
|
split.forEach((each) => {
|
|
134
135
|
try {
|
|
135
136
|
const [at, pNv] = each.replace(/\]\[/, ']-[').replace("-", "=").split("=");
|
|
136
|
-
kfStatement
|
|
137
|
+
// kfStatement+=` ${at.replace('@','').replace(/:/g,',').replace(/,/g,"%,").replace(/[\[|\]]/g,'')}% {${returnPnV(pNv.replace(/^\[|\]$/g,'').split(','))}}`
|
|
138
|
+
kfStatement += ` ${at.replace('@', '').replace(/:/g, ',').replace(/,/g, "%,").replace(/[\[|\]]/g, '')}% {${returnPnV(splitByCommaOutsideParens(pNv.replace(/^\[|\]$/g, '')))}}`;
|
|
137
139
|
}
|
|
138
140
|
catch (error) {
|
|
139
141
|
console.error('Not a valid entry for AliasCSS keyframes processor : ' + each, error);
|