aliascss 1.2.3 → 1.2.5
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/README.md +6 -4
- package/aliascss.config.js +24 -33
- package/dist/aliascss.js +1 -1
- package/lib/classPrinter.js +7 -1
- package/lib/compilers/shadow.js +2 -0
- package/lib/css-properties-all.js +29 -29
- package/lib/custom-css-compilers.js +117 -16
- package/lib/node/compileFile.js +9 -9
- package/lib/prebuild.d.ts +12 -116
- package/lib/prebuild.js +148 -106
- package/lib/prefix/responsive.js +13 -4
- package/lib/returnPropertyAndValue.js +2 -2
- package/lib/returnStatement.js +2 -1
- package/lib/static/customColorsRadix.d.ts +3540 -0
- package/lib/static/customColorsRadix.js +3797 -0
- package/lib/static/customStaticClassNames.js +22 -12
- package/lib/utils/helper.d.ts +5 -0
- package/lib/utils/helper.js +19 -0
- package/package.json +2 -2
- package/ts.js +22 -10
- package/ui-dev/app/index.bk +0 -45
- package/ui-dev/app/index.html +0 -51
- package/ui-dev/app/index.html.css +0 -127
- package/ui-dev/app/index.html.module.css +0 -55
- package/ui-dev/button.html +0 -87
- package/ui-dev/button.html.css +0 -196
- package/ui-dev/button.html.module.css +0 -55
- package/ui-dev/card-section-row-container-box-bk.html +0 -154
- package/ui-dev/card-section-row-container-box-bk.html.css +0 -109
- package/ui-dev/card-section-row-container-box-bk.html.module.css +0 -55
- package/ui-dev/card-section-row-container-box.html +0 -150
- package/ui-dev/card-section-row-container-box.html.css +0 -174
- package/ui-dev/card-section-row-container-box.html.module.css +0 -55
- package/ui-dev/examples/screen.html +0 -66
- package/ui-dev/examples/screen.html.css +0 -167
- package/ui-dev/examples/screen.html.module.css +0 -55
- package/ui-dev/index-preview-one.html +0 -72
- package/ui-dev/index-preview-one.html.css +0 -144
- package/ui-dev/index-preview-one.html.module.css +0 -55
- package/ui-dev/index-test.html +0 -79
- package/ui-dev/index-test.html.css +0 -206
- package/ui-dev/index-test.html.module.css +0 -55
- package/ui-dev/index.html +0 -191
- package/ui-dev/index.html.css +0 -227
- package/ui-dev/index.html.module.css +0 -55
- package/ui-dev/nav-red.html +0 -121
- package/ui-dev/nav-red.html.css +0 -149
- package/ui-dev/nav-red.html.module.css +0 -55
- package/ui-dev/navbar-demo.html +0 -121
- package/ui-dev/navbar-demo.html.css +0 -151
- package/ui-dev/navbar-demo.html.module.css +0 -55
- package/ui-dev/tooltip.html +0 -113
- package/ui-dev/tooltip.html.css +0 -90
- package/ui-dev/tooltip.html.module.css +0 -55
package/lib/classPrinter.js
CHANGED
|
@@ -6,6 +6,7 @@ export let classPrinter = {
|
|
|
6
6
|
styleTagExists: false,
|
|
7
7
|
customCheck: false,
|
|
8
8
|
useColon: true,
|
|
9
|
+
kfNames: {},
|
|
9
10
|
styleTag: null,
|
|
10
11
|
createStyleTag() {
|
|
11
12
|
if (this.styleTagExists === true) {
|
|
@@ -77,7 +78,7 @@ export let classPrinter = {
|
|
|
77
78
|
// }
|
|
78
79
|
if (testRegExpKF.test(each.name)) {
|
|
79
80
|
const key = each.name.replace(testRegExpKF, '');
|
|
80
|
-
let kfStatement = '@keyframes ' + key + "{\n";
|
|
81
|
+
let kfStatement = '@keyframes ' + this.kfNames[key] + "{\n";
|
|
81
82
|
const returnPnV = (e) => e.map((i) => statementMaker.make(i, undefined, true)).join(";");
|
|
82
83
|
const split = each.value.trim().split(/\s+/);
|
|
83
84
|
split.forEach((each) => {
|
|
@@ -217,9 +218,14 @@ export let classPrinter = {
|
|
|
217
218
|
},
|
|
218
219
|
run(el) {
|
|
219
220
|
// const event = new Event('acss:init');
|
|
221
|
+
var _a;
|
|
220
222
|
const $root = el || document;
|
|
221
223
|
// $root.dispatchEvent(event);
|
|
222
224
|
$root.dispatchEvent(new CustomEvent('acss:init', { bubbles: true, detail: { aliascss: this } }));
|
|
225
|
+
// create a keyframes object to fix case-sensitive issue
|
|
226
|
+
(_a = (el || document.body).outerHTML.match(/keyframes-[a-z0-9_-]+(?==)/gi)) === null || _a === void 0 ? void 0 : _a.forEach((each) => {
|
|
227
|
+
this.kfNames[each.replace('keyframes-', '').toLowerCase()] = each.replace('keyframes-', '');
|
|
228
|
+
});
|
|
223
229
|
// <template> element
|
|
224
230
|
Array.prototype.forEach.call($root.querySelectorAll('template'), (template) => {
|
|
225
231
|
// Array.prototype.forEach.call(template.content.querySelectorAll('[class],[acss-class]'), (e) => {
|
package/lib/compilers/shadow.js
CHANGED
|
@@ -9,6 +9,8 @@ export default function shadow(data, custom) {
|
|
|
9
9
|
eachValue += 'inset ';
|
|
10
10
|
e = e.replace(/^[-]?(inset|i)/, '');
|
|
11
11
|
}
|
|
12
|
+
if (!e.startsWith('-'))
|
|
13
|
+
e = "-" + e;
|
|
12
14
|
// fix Zero
|
|
13
15
|
e = e.replace(/(?<=-)0(?=-)/g, '0px').replace(/([-][0-9pd]{6,})/, (a) => a.replace(/p/g, 'xer'));
|
|
14
16
|
const match = e.match(/([-]?[-]?[0-9]{1,3}[d/.]?[0-9]*(px|em|p|fr|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))+/);
|
|
@@ -21,34 +21,34 @@ const remUnitsNegative = config.remUnitsNegative; // [`-${1/4}rem:-1`, `-${2/4}r
|
|
|
21
21
|
const cssProps = {
|
|
22
22
|
// type:s=static,d=dynamic
|
|
23
23
|
// -----------------xc----------------
|
|
24
|
-
'width-grow':
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
},
|
|
31
|
-
'width-shrink':
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
},
|
|
38
|
-
'height-grow':
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
'height-shrink':
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
},
|
|
24
|
+
// 'width-grow':{
|
|
25
|
+
// alias:'',
|
|
26
|
+
// property:'--width-grow',
|
|
27
|
+
// type:'d',
|
|
28
|
+
// compiler:length,
|
|
29
|
+
// values:[],
|
|
30
|
+
// },
|
|
31
|
+
// 'width-shrink':{
|
|
32
|
+
// alias:'',
|
|
33
|
+
// property:'--width-shrink',
|
|
34
|
+
// type:'d',
|
|
35
|
+
// compiler:length,
|
|
36
|
+
// values:[],
|
|
37
|
+
// },
|
|
38
|
+
// 'height-grow':{
|
|
39
|
+
// alias:'',
|
|
40
|
+
// property:'--height-grow',
|
|
41
|
+
// type:'d',
|
|
42
|
+
// compiler:length,
|
|
43
|
+
// values:[],
|
|
44
|
+
// },
|
|
45
|
+
// 'height-shrink':{
|
|
46
|
+
// alias:'',
|
|
47
|
+
// property:'--height-shrink',
|
|
48
|
+
// type:'d',
|
|
49
|
+
// compiler:length,
|
|
50
|
+
// values:[],
|
|
51
|
+
// },
|
|
52
52
|
// ----------xc-end
|
|
53
53
|
'accent-color': {
|
|
54
54
|
alias: 'accent',
|
|
@@ -1142,7 +1142,7 @@ const cssProps = {
|
|
|
1142
1142
|
alias: 'fw',
|
|
1143
1143
|
type: 's',
|
|
1144
1144
|
// compiler:'',
|
|
1145
|
-
values: ['bolder:b2:blr', 'lighter:l:ltr', '100:1', '200:2', '300:3', '400:4:normal:nl', '500:5', '600:6', '700:7:bold
|
|
1145
|
+
values: ['bolder:b2:blr', 'lighter:l:ltr', '100:1:thin', '200:2:extra-light', '300:3:light', '400:4:normal:nl:regular', '500:5:medium', '600:6:semi-bold', '700:7:bold', '800:8:extra-bold', '900:9:black'],
|
|
1146
1146
|
},
|
|
1147
1147
|
'forced-color-adjust': {
|
|
1148
1148
|
alias: 'fca',
|
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
import prebuild from "./prebuild.js";
|
|
2
|
-
|
|
2
|
+
import { cssVarWithDefault } from "./utils/helper.js";
|
|
3
|
+
import color from './compilers/color.js';
|
|
4
|
+
const cssCustomCompilers = Object.assign(Object.assign({}, prebuild), { 'Color': {
|
|
5
|
+
type: 'group',
|
|
6
|
+
compiler: (value, custom) => {
|
|
7
|
+
let stm = '';
|
|
8
|
+
const order = ['color', 'background-color', 'border-color'];
|
|
9
|
+
const values = value.replace(/^\(|\)$/g, '').split(',');
|
|
10
|
+
values.forEach((e, i) => {
|
|
11
|
+
if (i < order.length) {
|
|
12
|
+
stm += `${order[i]}:${color(e, custom)};`;
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
return stm;
|
|
16
|
+
}
|
|
17
|
+
}, 'theme': {
|
|
18
|
+
type: 'group',
|
|
19
|
+
compiler: (value, custom) => {
|
|
20
|
+
const values = value.replace(/^\(|\)$/g, '').split(',');
|
|
21
|
+
if (values.length === 3) {
|
|
22
|
+
return `${values[0]}:light-dark(${color(values[1], custom) || values[1]},${color(values[2], custom) || values[2]})`;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return '';
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}, 'ring': {
|
|
29
|
+
type: 'group',
|
|
30
|
+
compiler: (value, custom) => {
|
|
31
|
+
if (/^--[a-zA-Z]/.test(value)) {
|
|
32
|
+
return `box-shadow:0 0 0 var(--ring-width,2px) ${cssVarWithDefault(value, color, custom)}`;
|
|
33
|
+
}
|
|
34
|
+
return `box-shadow:0 0 0 var(--ring-width,2px) ${color(value, custom)}`;
|
|
35
|
+
}
|
|
36
|
+
},
|
|
3
37
|
// padding, margin
|
|
4
38
|
'padding-x': {
|
|
5
39
|
type: 'group',
|
|
@@ -285,43 +319,110 @@ const cssCustomCompilers = Object.assign(Object.assign({}, prebuild), {
|
|
|
285
319
|
},
|
|
286
320
|
},
|
|
287
321
|
// ---------------------x-custom-compiler
|
|
288
|
-
'x-
|
|
322
|
+
'x-row': {
|
|
323
|
+
type: 'group',
|
|
324
|
+
compiler: (value) => {
|
|
325
|
+
return `--x-row-gap:${value.replace(/^-(\d)/, '$1')};display:flex;flex-wrap:wrap;margin-left:calc(var(--x-row-gap,${value.replace(/^-(\d)/, '$1')}) * -0.5);margin-right:calc(var(--x-row-gap,${value.replace(/^-(\d)/, '$1')}) * 0.5);`;
|
|
326
|
+
},
|
|
327
|
+
groups: {
|
|
328
|
+
'xs': `--x-row-gap:4px;display:flex;flex-wrap:wrap;margin-left:calc(var(--x-row-gap,4px) * -0.5);margin-right:calc(var(--x-row-gap,16px) * 0.5);`,
|
|
329
|
+
'sm': `--x-row-gap:8px;display:flex;flex-wrap:wrap;margin-left:calc(var(--x-row-gap,8px) * -0.5);margin-right:calc(var(--x-row-gap,16px) * 0.5);`,
|
|
330
|
+
'md': `--x-row-gap:16px;display:flex;flex-wrap:wrap;margin-left:calc(var(--x-row-gap,16px) * -0.5);margin-right:calc(var(--x-row-gap,16px) * 0.5);`,
|
|
331
|
+
'lg': `--x-row-gap:24px;display:flex;flex-wrap:wrap;margin-left:calc(var(--x-row-gap,24px) * -0.5);margin-right:calc(var(--x-row-gap,16px) * 0.5);`,
|
|
332
|
+
'xl': `--x-row-gap:32px;display:flex;flex-wrap:wrap;margin-left:calc(var(--x-row-gap,32px) * -0.5);margin-right:calc(var(--x-row-gap,16px) * 0.5);`,
|
|
333
|
+
},
|
|
334
|
+
}, 'x-col': {
|
|
289
335
|
type: 'group',
|
|
290
336
|
compiler: (value) => {
|
|
291
|
-
|
|
292
|
-
|
|
337
|
+
return `--x-col-width:${value.replace(/^-(\d)/, '$1')};padding-left:calc(var(--x-row-gap,16px) * 0.5);padding-right:calc(var(--x-row-gap,16px) * 0.5);box-sizing:border-box;flex:0 0 var(--x-col-width,${value.replace(/^-(\d)/, '$1')});max-width:var(--x-col-width,${value.replace(/^-(\d)/, '$1')});`;
|
|
338
|
+
},
|
|
339
|
+
groups: {
|
|
340
|
+
'1': `padding-left:calc(var(--x-row-gap,16px) * 0.5);padding-right:calc(var(--x-row-gap,16px) * 0.5); box-sizing:border-box;flex:0 0 100%;max-width:100%;`,
|
|
341
|
+
'2': `padding-left:calc(var(--x-row-gap,16px) * 0.5);padding-right:calc(var(--x-row-gap,16px) * 0.5); box-sizing:border-box;flex:0 0 50%;max-width:50%;`,
|
|
342
|
+
'3': `padding-left:calc(var(--x-row-gap,16px) * 0.5);padding-right:calc(var(--x-row-gap,16px) * 0.5); box-sizing:border-box;flex:0 0 33.3333%;max-width:33.3333%;`,
|
|
343
|
+
'4': `padding-left:calc(var(--x-row-gap,16px) * 0.5);padding-right:calc(var(--x-row-gap,16px) * 0.5); box-sizing:border-box;flex:0 0 25%;max-width:25%;`,
|
|
344
|
+
'5': `padding-left:calc(var(--x-row-gap,16px) * 0.5);padding-right:calc(var(--x-row-gap,16px) * 0.5); box-sizing:border-box;flex:0 0 20%;max-width:20%;`,
|
|
345
|
+
'6': `padding-left:calc(var(--x-row-gap,16px) * 0.5);padding-right:calc(var(--x-row-gap,16px) * 0.5); box-sizing:border-box;flex:0 0 16.6667%;max-width:16.6667%;`,
|
|
346
|
+
'7': `padding-left:calc(var(--x-row-gap,16px) * 0.5);padding-right:calc(var(--x-row-gap,16px) * 0.5); box-sizing:border-box;flex:0 0 14.2857%;max-width:14.2857%;`,
|
|
347
|
+
'8': `padding-left:calc(var(--x-row-gap,16px) * 0.5);padding-right:calc(var(--x-row-gap,16px) * 0.5); box-sizing:border-box;flex:0 0 12.5%;max-width:12.5%;`,
|
|
348
|
+
'9': `padding-left:calc(var(--x-row-gap,16px) * 0.5);padding-right:calc(var(--x-row-gap,16px) * 0.5); box-sizing:border-box;flex:0 0 11.1111%;max-width:11.1111%;`,
|
|
349
|
+
'10': `padding-left:calc(var(--x-row-gap,16px) * 0.5);padding-right:calc(var(--x-row-gap,16px) * 0.5); box-sizing:border-box;flex:0 0 10%;max-width:10%;`,
|
|
350
|
+
'11': `padding-left:calc(var(--x-row-gap,16px) * 0.5);padding-right:calc(var(--x-row-gap,16px) * 0.5); box-sizing:border-box;flex:0 0 9.0909%;max-width:9.0909%;`,
|
|
351
|
+
'12': `padding-left:calc(var(--x-row-gap,16px) * 0.5);padding-right:calc(var(--x-row-gap,16px) * 0.5); box-sizing:border-box;flex:0 0 8.3333%;max-width:8.3333%;`,
|
|
293
352
|
},
|
|
294
|
-
},
|
|
353
|
+
},
|
|
354
|
+
// 'x-col-responsive':{
|
|
355
|
+
// type:'statement',
|
|
356
|
+
// statement:`[]`,
|
|
357
|
+
// },
|
|
358
|
+
'x-square': {
|
|
295
359
|
type: 'group',
|
|
296
360
|
compiler: (value) => {
|
|
297
|
-
|
|
298
|
-
|
|
361
|
+
// case i : --var:value;
|
|
362
|
+
let v = '';
|
|
363
|
+
if (/^--[a-zA-Z]/.test(value)) {
|
|
364
|
+
v = cssVarWithDefault(value) || '';
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
v = value.replace(/^-([-]?[\d])/g, '$1').replace(/([/d])p$/, '$1%');
|
|
368
|
+
}
|
|
369
|
+
const val = `calc(${v} - var(--x-square-shrink, 0px) + var(--x-square-grow, 0px))`;
|
|
370
|
+
return `width:${val};height:${val};flex: 0 0 ${val}`;
|
|
299
371
|
},
|
|
300
|
-
|
|
301
|
-
|
|
372
|
+
groups: {
|
|
373
|
+
'0': 'width:0px;height:0px;flex: 0 0 0px',
|
|
374
|
+
'1': 'width:1px;height:1px;flex: 0 0 1px',
|
|
375
|
+
'xs': 'width:4px;height:4px;flex: 0 0 4px',
|
|
376
|
+
'sm': 'width:8px;height:8px;flex: 0 0 8px',
|
|
377
|
+
'md': 'width:16px;height:16px;flex: 0 0 16px',
|
|
378
|
+
'lg': 'width:24px;height:1px;flex: 0 0 24px',
|
|
379
|
+
'xl': 'width:32px;height:1px;flex: 0 0 32px',
|
|
380
|
+
'xxl': 'width:64px;height:1px;flex: 0 0 64px',
|
|
381
|
+
}
|
|
382
|
+
},
|
|
383
|
+
// 'x-circle':{
|
|
384
|
+
// type:'group',
|
|
385
|
+
// compiler:(value)=>{
|
|
386
|
+
// let v=value;
|
|
387
|
+
// if(/^--[a-zA-Z]/.test(value)){
|
|
388
|
+
// if(value.includes(':')){
|
|
389
|
+
// const val=value.slice(value.indexOf(':')).replace(':','');
|
|
390
|
+
// const cssVar=value.replace(val,'').replace(':','');
|
|
391
|
+
// v=`var(${cssVar},${val.replace(/([/d])p$/,'$1%')}`;
|
|
392
|
+
// }else{
|
|
393
|
+
// v=`var(${value})`;
|
|
394
|
+
// }
|
|
395
|
+
// }else{
|
|
396
|
+
// v=value.replace(/^-([-]?[\d])/g,'$1').replace(/([/d])p$/,'$1%');
|
|
397
|
+
// }
|
|
398
|
+
// return `width:calc(${v} + var(--x-circle-grow,0px) - var(--x-circle-shrink,0px)); height:calc(${v} + var(--x-circle-grow,0px) - var(--x-circle-shrink,0px)); border-radius:99999px;`;
|
|
399
|
+
// },
|
|
400
|
+
// },
|
|
401
|
+
'x-width': {
|
|
402
|
+
type: 'group',
|
|
302
403
|
compiler: (value) => {
|
|
303
404
|
if (/^--[a-zA-Z]/.test(value)) {
|
|
304
405
|
if (value.includes(':')) {
|
|
305
406
|
const val = value.slice(value.indexOf(':')).replace(':', '');
|
|
306
407
|
const cssVar = value.replace(val, '').replace(':', '');
|
|
307
|
-
return `calc(var(${cssVar},${val}) + var(--x-width-grow,0px) - var(--x-width-shrink,0px))`;
|
|
408
|
+
return `width:calc(var(${cssVar},${val}) + var(--x-width-grow,0px) - var(--x-width-shrink,0px))`;
|
|
308
409
|
}
|
|
309
|
-
return `calc(var(${value}) + var(--x-width-grow,0px) - var(--x-width-shrink,0px))`;
|
|
410
|
+
return `width:calc(var(${value}) + var(--x-width-grow,0px) - var(--x-width-shrink,0px))`;
|
|
310
411
|
}
|
|
311
|
-
return `calc(${value.replace(/^-([-]?[\d])/g, '$1')} + var(--x-width-grow,0px) - var(--x-width-shrink,0px))`;
|
|
412
|
+
return `width:calc(${value.replace(/^-([-]?[\d])/g, '$1')} + var(--x-width-grow,0px) - var(--x-width-shrink,0px))`;
|
|
312
413
|
},
|
|
313
414
|
}, 'x-height': {
|
|
314
|
-
|
|
415
|
+
type: 'group',
|
|
315
416
|
compiler: (value) => {
|
|
316
417
|
if (/^--[a-zA-Z]/.test(value)) {
|
|
317
418
|
if (value.includes(':')) {
|
|
318
419
|
const val = value.slice(value.indexOf(':')).replace(':', '');
|
|
319
420
|
const cssVar = value.replace(val, '').replace(':', '');
|
|
320
|
-
return `calc(var(${cssVar},${val}) + var(--x-height-grow,0px) - var(--x-height-shrink,0px))`;
|
|
421
|
+
return `height:calc(var(${cssVar},${val}) + var(--x-height-grow,0px) - var(--x-height-shrink,0px))`;
|
|
321
422
|
}
|
|
322
|
-
return `calc(var(${value}) + var(--x-height-grow,0px) - var(--x-height-shrink,0px))`;
|
|
423
|
+
return `height:calc(var(${value}) + var(--x-height-grow,0px) - var(--x-height-shrink,0px))`;
|
|
323
424
|
}
|
|
324
|
-
return `calc(${value.replace(/^-([-]?[\d])/g, '$1')} + var(--x-height-grow,0px) - var(--x-height-shrink,0px))`;
|
|
425
|
+
return `height:calc(${value.replace(/^-([-]?[\d])/g, '$1')} + var(--x-height-grow,0px) - var(--x-height-shrink,0px))`;
|
|
325
426
|
},
|
|
326
427
|
} });
|
|
327
428
|
export default cssCustomCompilers;
|
package/lib/node/compileFile.js
CHANGED
|
@@ -48,10 +48,10 @@ export function globalCSSCompiler() {
|
|
|
48
48
|
input.forEach((file) => {
|
|
49
49
|
const [gbContent,] = compileFile(file, config, statementMaker, classList);
|
|
50
50
|
try {
|
|
51
|
-
fs.writeFileSync(init.output, `\n/* Start :-----------ACSS ${path.
|
|
52
|
-
\n/* End :-----------ACSS ${path.
|
|
51
|
+
fs.writeFileSync(init.output, `\n/* Start :-----------ACSS ${path.relative('.', file)}------------------------*/\n${gbContent}
|
|
52
|
+
\n/* End :-----------ACSS ${path.relative('.', file)}----------------------------*/\n
|
|
53
53
|
`, { flag: 'a+' });
|
|
54
|
-
console.log('AliasCSS compiled', path.
|
|
54
|
+
console.log('AliasCSS compiled', path.relative('.', file), 'to main css file :' + init.output);
|
|
55
55
|
}
|
|
56
56
|
catch (error) {
|
|
57
57
|
console.log('\x1b[31m', "Couldn't able to append/create to main css file :" + init.output);
|
|
@@ -141,7 +141,7 @@ export function createCSSFileByFile(file, bool = false) {
|
|
|
141
141
|
try {
|
|
142
142
|
fs.writeFileSync(file + '.module.css', module);
|
|
143
143
|
// console.log(content);
|
|
144
|
-
console.log('AliasCSS compiled', path.
|
|
144
|
+
console.log('AliasCSS compiled', path.relative('.', file), 'module Locally ');
|
|
145
145
|
}
|
|
146
146
|
catch (error) {
|
|
147
147
|
console.log('\x1b[31m', "Couldn't able to append/create locally from " + file);
|
|
@@ -152,7 +152,7 @@ export function createCSSFileByFile(file, bool = false) {
|
|
|
152
152
|
try {
|
|
153
153
|
fs.writeFileSync(file + '.css', content);
|
|
154
154
|
// console.log(content);
|
|
155
|
-
console.log('AliasCSS compiled', path.
|
|
155
|
+
console.log('AliasCSS compiled', path.relative('.', file), 'Locally');
|
|
156
156
|
}
|
|
157
157
|
catch (error) {
|
|
158
158
|
console.log('\x1b[31m', "Couldn't able to append/create locally from " + file);
|
|
@@ -162,10 +162,10 @@ export function createCSSFileByFile(file, bool = false) {
|
|
|
162
162
|
// Check for Global
|
|
163
163
|
if (!bool && init.output) {
|
|
164
164
|
try {
|
|
165
|
-
fs.writeFileSync(init.output, `\n/* Start :-----------ACSS ${path.
|
|
166
|
-
\n/* End :-----------ACSS ${path.
|
|
165
|
+
fs.writeFileSync(init.output, `\n/* Start :-----------ACSS ${path.relative('.', file)}------------------------*/\n${postcss([postcssDiscardDuplicates]).process(gbContent)}
|
|
166
|
+
\n/* End :-----------ACSS ${path.relative('.', file)}----------------------------*/\n
|
|
167
167
|
`, { flag: 'a+' });
|
|
168
|
-
console.log('AliasCSS compiled', path.
|
|
168
|
+
console.log('AliasCSS compiled', path.relative('.', file), 'to main css file :' + init.output);
|
|
169
169
|
}
|
|
170
170
|
catch (error) {
|
|
171
171
|
console.log('\x1b[31m', "Couldn't able to append/create to main css file :" + init.output);
|
|
@@ -178,7 +178,7 @@ export function postify(file, plugin, minify = false) {
|
|
|
178
178
|
if (fs.existsSync(file)) {
|
|
179
179
|
if (minify === true)
|
|
180
180
|
plugin.push(cssnano);
|
|
181
|
-
postcss(plugin).process(data).then(result => {
|
|
181
|
+
postcss(plugin).process(data, { from: undefined }).then(result => {
|
|
182
182
|
fs.truncateSync(file);
|
|
183
183
|
fs.writeFileSync(file, result.css);
|
|
184
184
|
});
|
package/lib/prebuild.d.ts
CHANGED
|
@@ -135,30 +135,6 @@ declare const _default: {
|
|
|
135
135
|
type: string;
|
|
136
136
|
statement: string;
|
|
137
137
|
};
|
|
138
|
-
'x-section': {
|
|
139
|
-
type: string;
|
|
140
|
-
statement: string;
|
|
141
|
-
};
|
|
142
|
-
'x-container': {
|
|
143
|
-
type: string;
|
|
144
|
-
statement: string;
|
|
145
|
-
};
|
|
146
|
-
'x-row': {
|
|
147
|
-
type: string;
|
|
148
|
-
statement: string;
|
|
149
|
-
};
|
|
150
|
-
'x-col': {
|
|
151
|
-
type: string;
|
|
152
|
-
statement: string;
|
|
153
|
-
};
|
|
154
|
-
'x-box': {
|
|
155
|
-
type: string;
|
|
156
|
-
statement: string;
|
|
157
|
-
};
|
|
158
|
-
'x-card': {
|
|
159
|
-
type: string;
|
|
160
|
-
statement: string;
|
|
161
|
-
};
|
|
162
138
|
'x-divider-text': {
|
|
163
139
|
type: string;
|
|
164
140
|
statement: string;
|
|
@@ -171,6 +147,10 @@ declare const _default: {
|
|
|
171
147
|
type: string;
|
|
172
148
|
statement: string;
|
|
173
149
|
};
|
|
150
|
+
'x-input': {
|
|
151
|
+
type: string;
|
|
152
|
+
statement: string;
|
|
153
|
+
};
|
|
174
154
|
'x-arrow': {
|
|
175
155
|
type: string;
|
|
176
156
|
statement: string;
|
|
@@ -195,50 +175,6 @@ declare const _default: {
|
|
|
195
175
|
type: string;
|
|
196
176
|
statement: string;
|
|
197
177
|
};
|
|
198
|
-
'x-currency-latin-f': {
|
|
199
|
-
type: string;
|
|
200
|
-
statement: string;
|
|
201
|
-
};
|
|
202
|
-
'x-currency-armenian-dram': {
|
|
203
|
-
type: string;
|
|
204
|
-
statement: string;
|
|
205
|
-
};
|
|
206
|
-
'x-currency-afghani': {
|
|
207
|
-
type: string;
|
|
208
|
-
statement: string;
|
|
209
|
-
};
|
|
210
|
-
'x-currency-bengali-mark': {
|
|
211
|
-
type: string;
|
|
212
|
-
statement: string;
|
|
213
|
-
};
|
|
214
|
-
'x-currency-bengali-sign': {
|
|
215
|
-
type: string;
|
|
216
|
-
statement: string;
|
|
217
|
-
};
|
|
218
|
-
'x-currency-gujarati-sign': {
|
|
219
|
-
type: string;
|
|
220
|
-
statement: string;
|
|
221
|
-
};
|
|
222
|
-
'x-currency-tamil-sign': {
|
|
223
|
-
type: string;
|
|
224
|
-
statement: string;
|
|
225
|
-
};
|
|
226
|
-
'x-currency-thai-baht': {
|
|
227
|
-
type: string;
|
|
228
|
-
statement: string;
|
|
229
|
-
};
|
|
230
|
-
'x-currency-khmer-riel': {
|
|
231
|
-
type: string;
|
|
232
|
-
statement: string;
|
|
233
|
-
};
|
|
234
|
-
'x-currency-rial': {
|
|
235
|
-
type: string;
|
|
236
|
-
statement: string;
|
|
237
|
-
};
|
|
238
|
-
'x-currency-wancho-ngun': {
|
|
239
|
-
type: string;
|
|
240
|
-
statement: string;
|
|
241
|
-
};
|
|
242
178
|
'x-currency-euro-currency': {
|
|
243
179
|
type: string;
|
|
244
180
|
statement: string;
|
|
@@ -247,58 +183,10 @@ declare const _default: {
|
|
|
247
183
|
type: string;
|
|
248
184
|
statement: string;
|
|
249
185
|
};
|
|
250
|
-
'x-currency-franc': {
|
|
251
|
-
type: string;
|
|
252
|
-
statement: string;
|
|
253
|
-
};
|
|
254
|
-
'x-currency-lira': {
|
|
255
|
-
type: string;
|
|
256
|
-
statement: string;
|
|
257
|
-
};
|
|
258
|
-
'x-currency-naira': {
|
|
259
|
-
type: string;
|
|
260
|
-
statement: string;
|
|
261
|
-
};
|
|
262
186
|
'x-currency-rupee': {
|
|
263
187
|
type: string;
|
|
264
188
|
statement: string;
|
|
265
189
|
};
|
|
266
|
-
'x-currency-peso': {
|
|
267
|
-
type: string;
|
|
268
|
-
statement: string;
|
|
269
|
-
};
|
|
270
|
-
'x-currency-shekel': {
|
|
271
|
-
type: string;
|
|
272
|
-
statement: string;
|
|
273
|
-
};
|
|
274
|
-
'x-currency-won': {
|
|
275
|
-
type: string;
|
|
276
|
-
statement: string;
|
|
277
|
-
};
|
|
278
|
-
'x-currency-tugrik': {
|
|
279
|
-
type: string;
|
|
280
|
-
statement: string;
|
|
281
|
-
};
|
|
282
|
-
'x-currency-drachma': {
|
|
283
|
-
type: string;
|
|
284
|
-
statement: string;
|
|
285
|
-
};
|
|
286
|
-
'x-currency-kip': {
|
|
287
|
-
type: string;
|
|
288
|
-
statement: string;
|
|
289
|
-
};
|
|
290
|
-
'x-currency-guarani': {
|
|
291
|
-
type: string;
|
|
292
|
-
statement: string;
|
|
293
|
-
};
|
|
294
|
-
'x-currency-hryvnia': {
|
|
295
|
-
type: string;
|
|
296
|
-
statement: string;
|
|
297
|
-
};
|
|
298
|
-
'x-currency-cedi': {
|
|
299
|
-
type: string;
|
|
300
|
-
statement: string;
|
|
301
|
-
};
|
|
302
190
|
'x-symbol-copy-right': {
|
|
303
191
|
type: string;
|
|
304
192
|
statement: string;
|
|
@@ -347,5 +235,13 @@ declare const _default: {
|
|
|
347
235
|
type: string;
|
|
348
236
|
statement: string;
|
|
349
237
|
};
|
|
238
|
+
'x-acss-utils': {
|
|
239
|
+
type: string;
|
|
240
|
+
statement: string;
|
|
241
|
+
};
|
|
242
|
+
'x-acss-vars-dark': {
|
|
243
|
+
type: string;
|
|
244
|
+
statement: string;
|
|
245
|
+
};
|
|
350
246
|
};
|
|
351
247
|
export default _default;
|