@projectwallace/format-css 1.3.6 → 1.4.0
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/dist/format-css.js +129 -134
- package/dist/format-css.umd.cjs +2 -3
- package/dist/index.d.ts +8 -3
- package/package.json +16 -6
package/dist/format-css.js
CHANGED
|
@@ -1,143 +1,138 @@
|
|
|
1
|
-
import
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
function b(n) {
|
|
6
|
-
return w.repeat(n);
|
|
1
|
+
import K from "css-tree/parser";
|
|
2
|
+
const f = " ", u = "", _ = ":", C = ";", O = "(", L = ")", I = "Atrule", Y = "Rule", h = "Block", w = "SelectorList", $ = "Selector", k = "Declaration", m = "Operator";
|
|
3
|
+
function a(i) {
|
|
4
|
+
return /[A-Z]/.test(i) ? i.toLowerCase() : i;
|
|
7
5
|
}
|
|
8
|
-
function p
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
function C(n, r) {
|
|
12
|
-
let e = n.loc;
|
|
13
|
-
if (!e)
|
|
14
|
-
return a;
|
|
15
|
-
let t = e.start, f = e.end, u = r.substring(t.offset, f.offset);
|
|
16
|
-
return t.line === f.line ? u : u.replace(/\s+/g, i);
|
|
17
|
-
}
|
|
18
|
-
function h(n, r) {
|
|
19
|
-
let e = n.loc;
|
|
20
|
-
return e ? r.substring(e.start.offset, e.end.offset) : a;
|
|
21
|
-
}
|
|
22
|
-
function N(n, r, e) {
|
|
23
|
-
let t, f = n.prelude, u = n.block;
|
|
24
|
-
return f.type === k ? t = $(f, r, e) : t = E(f, r, e), u.type === _ && (t += x(u, r, e)), t;
|
|
25
|
-
}
|
|
26
|
-
function $(n, r, e) {
|
|
27
|
-
let t = a;
|
|
28
|
-
return n.children.forEach((u, l) => {
|
|
29
|
-
u.type === S ? t += B(u, r, e) : t += E(u, r, e), l.next !== null && (t += "," + o);
|
|
30
|
-
}), t;
|
|
31
|
-
}
|
|
32
|
-
function y(n, r) {
|
|
33
|
-
let e = a;
|
|
34
|
-
return n.children && n.children.forEach((t) => {
|
|
35
|
-
switch (t.type) {
|
|
36
|
-
case "Combinator": {
|
|
37
|
-
e += i, t.name !== " " && (e += t.name + i);
|
|
38
|
-
break;
|
|
39
|
-
}
|
|
40
|
-
case "PseudoElementSelector": {
|
|
41
|
-
e += s + s, e += p(t.name) ? t.name.toLowerCase() : t.name;
|
|
42
|
-
break;
|
|
43
|
-
}
|
|
44
|
-
case "PseudoClassSelector": {
|
|
45
|
-
e += s;
|
|
46
|
-
let f = t.name, u = p(f) ? f.toLowerCase() : f;
|
|
47
|
-
(u === "before" || u === "after") && (e += s), e += u, t.children && (e += "(" + y(t, r) + ")");
|
|
48
|
-
break;
|
|
49
|
-
}
|
|
50
|
-
case k: {
|
|
51
|
-
t.children.forEach((f, u) => {
|
|
52
|
-
f.type === S && (e += y(f, r)), u.next && (e += "," + i);
|
|
53
|
-
});
|
|
54
|
-
break;
|
|
55
|
-
}
|
|
56
|
-
case "Nth": {
|
|
57
|
-
let f = t.nth;
|
|
58
|
-
if (f)
|
|
59
|
-
if (f.type === "AnPlusB") {
|
|
60
|
-
let u = f.a, l = f.b;
|
|
61
|
-
u !== null && (e += u + "n"), u !== null && l !== null && (e += i), l !== null && (u !== null && !l.startsWith("-") && (e += "+" + i), e += l);
|
|
62
|
-
} else
|
|
63
|
-
e += C(t.nth, r);
|
|
64
|
-
t.selector !== null && (e += i + "of" + i + y(t.selector, r));
|
|
65
|
-
break;
|
|
66
|
-
}
|
|
67
|
-
default: {
|
|
68
|
-
e += C(t, r);
|
|
69
|
-
break;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}), e;
|
|
73
|
-
}
|
|
74
|
-
function B(n, r, e) {
|
|
75
|
-
return b(e) + y(n, r);
|
|
76
|
-
}
|
|
77
|
-
function x(n, r, e) {
|
|
78
|
-
let t = n.children, f = c;
|
|
79
|
-
return t.isEmpty ? f + "{}" : (f += "{" + o, e++, t.forEach((u, l) => {
|
|
80
|
-
u.type === L ? (f += M(u, r, e), l.next === null ? f += R : f += P) : (l.prev !== null && l.prev.data.type === L && (f += o), u.type === O ? f += N(u, r, e) : u.type === A ? f += I(u, r, e) : f += E(u, r, e)), l.next !== null && (f += o, u.type !== L && (f += o));
|
|
81
|
-
}), e--, f += o, f += b(e) + "}", f);
|
|
82
|
-
}
|
|
83
|
-
function I(n, r, e) {
|
|
84
|
-
let t = b(e) + "@", f = n.name, u = n.prelude, l = n.block;
|
|
85
|
-
return t += p(f) ? f.toLowerCase() : f, u !== null && (t += i + D(u, r)), l === null ? t += P : l.type === _ && (t += x(l, r, e)), t;
|
|
86
|
-
}
|
|
87
|
-
function D(n, r) {
|
|
88
|
-
let e = C(n, r);
|
|
89
|
-
return e.replace(/\s*([:,])/g, e.includes("selector(") ? "$1" : "$1 ").replace(/\s*(=>|<=)\s*/g, " $1 ").replace(/\)([a-zA-Z])/g, ") $1").replace(new RegExp("(?<!<=)(?<!=>)(?<!<= )([<>])(?![<= ])(?![=> ])(?![ =>])", "g"), " $1 ").replace(/\s+/g, i);
|
|
90
|
-
}
|
|
91
|
-
function M(n, r, e) {
|
|
92
|
-
let t = n.property;
|
|
93
|
-
t.charCodeAt(0) === 45 && t.charCodeAt(1) === 45 || p(t) && (t = t.toLowerCase());
|
|
94
|
-
let f = Y(n.value, r);
|
|
95
|
-
return t === "font" && (f = f.replace(/\s*\/\s*/, "/")), b(e) + t + s + c + f;
|
|
96
|
-
}
|
|
97
|
-
function T(n, r) {
|
|
98
|
-
let e = a;
|
|
99
|
-
return n.forEach((t, f) => {
|
|
100
|
-
t.type === "Identifier" ? e += t.name : t.type === "Function" ? e += W(t, r) : t.type === "Dimension" ? e += V(t) : t.type === "Value" ? e += Y(t, r) : t.type === m ? e += U(t) : t.type === "Parentheses" ? e += "(" + T(t.children, r) + ")" : e += C(t, r), t.type !== m && f.next !== null && f.next.data.type !== m && (e += i);
|
|
101
|
-
}), e;
|
|
102
|
-
}
|
|
103
|
-
function U(n) {
|
|
104
|
-
let r = a, e = n.value.trim(), t = e.charCodeAt(0);
|
|
105
|
-
return t === 43 || t === 45 ? r += i : t !== 44 && (r += c), r += e, t === 43 || t === 45 ? r += i : r += c, r;
|
|
106
|
-
}
|
|
107
|
-
function V(n) {
|
|
108
|
-
let r = n.unit, e = n.value;
|
|
109
|
-
return e += p(r) ? r.toLowerCase() : r, e;
|
|
110
|
-
}
|
|
111
|
-
function Y(n, r) {
|
|
112
|
-
return n.type === "Raw" ? E(n, r, 0) : T(n.children, r);
|
|
113
|
-
}
|
|
114
|
-
function W(n, r) {
|
|
115
|
-
let e = n.name, t = e;
|
|
116
|
-
return p(e) && (t = e.toLowerCase()), t += "(", t += T(n.children, r), t += ")", t;
|
|
117
|
-
}
|
|
118
|
-
function E(n, r, e) {
|
|
119
|
-
return b(e) + h(n, r).trim();
|
|
120
|
-
}
|
|
121
|
-
function Z(n, r, e = 0) {
|
|
122
|
-
let t = a;
|
|
123
|
-
return n.children.forEach((u, l) => {
|
|
124
|
-
u.type === O ? t += N(u, r, e) : u.type === A ? t += I(u, r, e) : t += E(u, r, e), l.next !== null && (t += o + o);
|
|
125
|
-
}), t;
|
|
126
|
-
}
|
|
127
|
-
function z(n, { minify: r = !1 } = {}) {
|
|
128
|
-
let e = g(n, {
|
|
6
|
+
function j(i, { minify: p = !1 } = {}) {
|
|
7
|
+
let g = K(i, {
|
|
129
8
|
positions: !0,
|
|
130
9
|
parseAtrulePrelude: !1,
|
|
131
10
|
parseCustomProperty: !0,
|
|
132
11
|
parseValue: !0
|
|
133
12
|
});
|
|
134
|
-
|
|
135
|
-
`,
|
|
136
|
-
|
|
137
|
-
function
|
|
138
|
-
|
|
13
|
+
const B = p ? u : " ", o = p ? u : `
|
|
14
|
+
`, b = p ? u : f, D = p ? u : C;
|
|
15
|
+
let s = 0;
|
|
16
|
+
function E(n) {
|
|
17
|
+
return B.repeat(n);
|
|
18
|
+
}
|
|
19
|
+
function y(n) {
|
|
20
|
+
let e = n.loc;
|
|
21
|
+
return e ? i.slice(e.start.offset, e.end.offset) : u;
|
|
22
|
+
}
|
|
23
|
+
function M(n) {
|
|
24
|
+
let e = n.loc;
|
|
25
|
+
return e ? i.slice(e.start.offset, e.end.offset) : u;
|
|
26
|
+
}
|
|
27
|
+
function N(n) {
|
|
28
|
+
let e, t = n.prelude, r = n.block;
|
|
29
|
+
return t.type === w ? e = H(t) : e = T(t, s), r.type === h && (e += R(r)), e;
|
|
30
|
+
}
|
|
31
|
+
function H(n) {
|
|
32
|
+
let e = u;
|
|
33
|
+
return n.children.forEach((t, r) => {
|
|
34
|
+
t.type === $ && (e += U(t)), r.next !== null && (e += "," + o);
|
|
35
|
+
}), e;
|
|
36
|
+
}
|
|
37
|
+
function P(n) {
|
|
38
|
+
let e = u;
|
|
39
|
+
return (n.children || []).forEach((r) => {
|
|
40
|
+
switch (r.type) {
|
|
41
|
+
case "Combinator": {
|
|
42
|
+
e += f, r.name !== " " && (e += r.name + f);
|
|
43
|
+
break;
|
|
44
|
+
}
|
|
45
|
+
case "PseudoElementSelector": {
|
|
46
|
+
e += _ + _, e += a(r.name);
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
case "PseudoClassSelector": {
|
|
50
|
+
e += _;
|
|
51
|
+
let l = a(r.name);
|
|
52
|
+
(l === "before" || l === "after") && (e += _), e += l, r.children && (e += O + P(r) + L);
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
case w: {
|
|
56
|
+
r.children.forEach((l, c) => {
|
|
57
|
+
l.type === $ && (e += P(l)), c.next && (e += "," + f);
|
|
58
|
+
});
|
|
59
|
+
break;
|
|
60
|
+
}
|
|
61
|
+
case "Nth": {
|
|
62
|
+
let l = r.nth;
|
|
63
|
+
if (l)
|
|
64
|
+
if (l.type === "AnPlusB") {
|
|
65
|
+
let c = l.a, A = l.b;
|
|
66
|
+
c !== null && (e += c + "n"), c !== null && A !== null && (e += f), A !== null && (c !== null && !A.startsWith("-") && (e += "+" + f), e += A);
|
|
67
|
+
} else
|
|
68
|
+
e += y(l);
|
|
69
|
+
r.selector !== null && (e += f + "of" + f + P(r.selector));
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
default: {
|
|
73
|
+
e += y(r);
|
|
74
|
+
break;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}), e;
|
|
78
|
+
}
|
|
79
|
+
function U(n) {
|
|
80
|
+
return E(s) + P(n);
|
|
81
|
+
}
|
|
82
|
+
function R(n) {
|
|
83
|
+
let e = n.children, t = b;
|
|
84
|
+
return e.isEmpty ? t + "{}" : (t += "{" + o, s++, e.forEach((r, l) => {
|
|
85
|
+
r.type === k ? (t += W(r), l.next === null ? t += D : t += C) : (l.prev !== null && l.prev.data.type === k && (t += o), r.type === Y ? t += N(r) : r.type === I ? t += v(r) : t += T(r, s)), l.next !== null && (t += o, r.type !== k && (t += o));
|
|
86
|
+
}), s--, t += o, t += E(s) + "}", t);
|
|
87
|
+
}
|
|
88
|
+
function v(n) {
|
|
89
|
+
let e = E(s) + "@", t = n.prelude, r = n.block;
|
|
90
|
+
return e += a(n.name), t !== null && (e += f + V(t)), r === null ? e += C : r.type === h && (e += R(r)), e;
|
|
91
|
+
}
|
|
92
|
+
function V(n) {
|
|
93
|
+
let e = y(n);
|
|
94
|
+
return e.replace(/\s*([:,])/g, e.includes("selector(") ? "$1" : "$1 ").replace(/\s*(=>|<=)\s*/g, " $1 ").replace(/\)([a-zA-Z])/g, ") $1").replace(new RegExp("(?<!<=)(?<!=>)(?<!<= )([<>])(?![<= ])(?![=> ])(?![ =>])", "g"), " $1 ").replace(/\s+/g, f);
|
|
95
|
+
}
|
|
96
|
+
function W(n) {
|
|
97
|
+
let e = n.property;
|
|
98
|
+
e.charCodeAt(0) === 45 && e.charCodeAt(1) === 45 || (e = a(e));
|
|
99
|
+
let t = x(n.value);
|
|
100
|
+
return e === "font" && (t = t.replace(/\s*\/\s*/, "/")), t === u && p && (t += f), E(s) + e + _ + b + t;
|
|
101
|
+
}
|
|
102
|
+
function S(n) {
|
|
103
|
+
let e = u;
|
|
104
|
+
return n.forEach((t, r) => {
|
|
105
|
+
t.type === "Identifier" ? e += t.name : t.type === "Function" ? e += F(t) : t.type === "Dimension" ? e += z(t) : t.type === "Value" ? e += x(t) : t.type === m ? e += Z(t) : t.type === "Parentheses" ? e += O + S(t.children) + L : e += y(t), t.type !== m && r.next !== null && r.next.data.type !== m && (e += f);
|
|
106
|
+
}), e;
|
|
107
|
+
}
|
|
108
|
+
function Z(n) {
|
|
109
|
+
let e = u, t = n.value.trim(), r = t.charCodeAt(0);
|
|
110
|
+
return r === 43 || r === 45 ? e += f : r !== 44 && (e += b), e += t, r === 43 || r === 45 ? e += f : e += b, e;
|
|
111
|
+
}
|
|
112
|
+
function z(n) {
|
|
113
|
+
return n.value + a(n.unit);
|
|
114
|
+
}
|
|
115
|
+
function x(n) {
|
|
116
|
+
return n.type === "Raw" ? T(n, 0) : S(n.children);
|
|
117
|
+
}
|
|
118
|
+
function F(n) {
|
|
119
|
+
return a(n.name) + O + S(n.children) + L;
|
|
120
|
+
}
|
|
121
|
+
function T(n, e) {
|
|
122
|
+
return E(e) + M(n).trim();
|
|
123
|
+
}
|
|
124
|
+
function G(n) {
|
|
125
|
+
let e = u;
|
|
126
|
+
return n.children.forEach((r, l) => {
|
|
127
|
+
r.type === Y ? e += N(r) : r.type === I ? e += v(r) : e += T(r, s), l.next !== null && (e += o + o);
|
|
128
|
+
}), e;
|
|
129
|
+
}
|
|
130
|
+
return G(g);
|
|
131
|
+
}
|
|
132
|
+
function J(i) {
|
|
133
|
+
return j(i, { minify: !0 });
|
|
139
134
|
}
|
|
140
135
|
export {
|
|
141
|
-
|
|
142
|
-
|
|
136
|
+
j as format,
|
|
137
|
+
J as minify
|
|
143
138
|
};
|
package/dist/format-css.umd.cjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
(function(
|
|
2
|
-
`,
|
|
3
|
-
`,y=r?o:i,g=r?o:L,q(e,n,0)}function z(n){return $(n,{minify:!0})}p.format=$,p.minify=z,Object.defineProperty(p,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(o,E){typeof exports=="object"&&typeof module<"u"?E(exports,require("css-tree/parser")):typeof define=="function"&&define.amd?define(["exports","css-tree/parser"],E):(o=typeof globalThis<"u"?globalThis:o||self,E(o.formatCss={},o.parse))})(this,function(o,E){"use strict";const f=" ",u="",y=":",O=";",m="(",L=")",h="Atrule",v="Rule",x="Block",I="SelectorList",Y="Selector",k="Declaration",N="Operator";function a(i){return/[A-Z]/.test(i)?i.toLowerCase():i}function w(i,{minify:_=!1}={}){let D=E(i,{positions:!0,parseAtrulePrelude:!1,parseCustomProperty:!0,parseValue:!0});const j=_?u:" ",c=_?u:`
|
|
2
|
+
`,T=_?u:f,H=_?u:O;let s=0;function b(n){return j.repeat(n)}function P(n){let e=n.loc;return e?i.slice(e.start.offset,e.end.offset):u}function U(n){let e=n.loc;return e?i.slice(e.start.offset,e.end.offset):u}function g(n){let e,t=n.prelude,r=n.block;return t.type===I?e=V(t):e=A(t,s),r.type===x&&(e+=$(r)),e}function V(n){let e=u;return n.children.forEach((t,r)=>{t.type===Y&&(e+=W(t)),r.next!==null&&(e+=","+c)}),e}function S(n){let e=u;return(n.children||[]).forEach(r=>{switch(r.type){case"Combinator":{e+=f,r.name!==" "&&(e+=r.name+f);break}case"PseudoElementSelector":{e+=y+y,e+=a(r.name);break}case"PseudoClassSelector":{e+=y;let l=a(r.name);(l==="before"||l==="after")&&(e+=y),e+=l,r.children&&(e+=m+S(r)+L);break}case I:{r.children.forEach((l,p)=>{l.type===Y&&(e+=S(l)),p.next&&(e+=","+f)});break}case"Nth":{let l=r.nth;if(l)if(l.type==="AnPlusB"){let p=l.a,C=l.b;p!==null&&(e+=p+"n"),p!==null&&C!==null&&(e+=f),C!==null&&(p!==null&&!C.startsWith("-")&&(e+="+"+f),e+=C)}else e+=P(l);r.selector!==null&&(e+=f+"of"+f+S(r.selector));break}default:{e+=P(r);break}}}),e}function W(n){return b(s)+S(n)}function $(n){let e=n.children,t=T;return e.isEmpty?t+"{}":(t+="{"+c,s++,e.forEach((r,l)=>{r.type===k?(t+=q(r),l.next===null?t+=H:t+=O):(l.prev!==null&&l.prev.data.type===k&&(t+=c),r.type===v?t+=g(r):r.type===h?t+=d(r):t+=A(r,s)),l.next!==null&&(t+=c,r.type!==k&&(t+=c))}),s--,t+=c,t+=b(s)+"}",t)}function d(n){let e=b(s)+"@",t=n.prelude,r=n.block;return e+=a(n.name),t!==null&&(e+=f+Z(t)),r===null?e+=O:r.type===x&&(e+=$(r)),e}function Z(n){let e=P(n);return e.replace(/\s*([:,])/g,e.includes("selector(")?"$1":"$1 ").replace(/\s*(=>|<=)\s*/g," $1 ").replace(/\)([a-zA-Z])/g,") $1").replace(new RegExp("(?<!<=)(?<!=>)(?<!<= )([<>])(?![<= ])(?![=> ])(?![ =>])","g")," $1 ").replace(/\s+/g,f)}function q(n){let e=n.property;e.charCodeAt(0)===45&&e.charCodeAt(1)===45||(e=a(e));let t=B(n.value);return e==="font"&&(t=t.replace(/\s*\/\s*/,"/")),t===u&&_&&(t+=f),b(s)+e+y+T+t}function R(n){let e=u;return n.forEach((t,r)=>{t.type==="Identifier"?e+=t.name:t.type==="Function"?e+=G(t):t.type==="Dimension"?e+=F(t):t.type==="Value"?e+=B(t):t.type===N?e+=z(t):t.type==="Parentheses"?e+=m+R(t.children)+L:e+=P(t),t.type!==N&&r.next!==null&&r.next.data.type!==N&&(e+=f)}),e}function z(n){let e=u,t=n.value.trim(),r=t.charCodeAt(0);return r===43||r===45?e+=f:r!==44&&(e+=T),e+=t,r===43||r===45?e+=f:e+=T,e}function F(n){return n.value+a(n.unit)}function B(n){return n.type==="Raw"?A(n,0):R(n.children)}function G(n){return a(n.name)+m+R(n.children)+L}function A(n,e){return b(e)+U(n).trim()}function K(n){let e=u;return n.children.forEach((r,l)=>{r.type===v?e+=g(r):r.type===h?e+=d(r):e+=A(r,s),l.next!==null&&(e+=c+c)}),e}return K(D)}function M(i){return w(i,{minify:!0})}o.format=w,o.minify=M,Object.defineProperty(o,Symbol.toStringTag,{value:"Module"})});
|
package/dist/index.d.ts
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* @typedef {Object} Options
|
|
3
3
|
* @property {boolean} [minify] Whether to minify the CSS or keep it formatted
|
|
4
4
|
*
|
|
5
|
-
*
|
|
5
|
+
* Format a string of CSS using some simple rules
|
|
6
6
|
* @param {string} css The original CSS
|
|
7
7
|
* @param {Options} options
|
|
8
8
|
* @returns {string} The formatted CSS
|
|
9
9
|
*/
|
|
10
10
|
export function format(css: string, { minify }?: Options): string;
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Minify a string of CSS
|
|
13
13
|
* @param {string} css The original CSS
|
|
14
14
|
* @returns {string} The minified CSS
|
|
15
15
|
*/
|
|
@@ -18,7 +18,12 @@ export type Options = {
|
|
|
18
18
|
/**
|
|
19
19
|
* Whether to minify the CSS or keep it formatted
|
|
20
20
|
*
|
|
21
|
-
*
|
|
21
|
+
* Format a string of CSS using some simple rules
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Whether to minify the CSS or keep it formatted
|
|
25
|
+
*
|
|
26
|
+
* Format a string of CSS using some simple rules
|
|
22
27
|
*/
|
|
23
28
|
minify?: boolean | undefined;
|
|
24
29
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@projectwallace/format-css",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Fast, small, zero-config library to format CSS with basic rules.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "index.js",
|
|
@@ -15,17 +15,21 @@
|
|
|
15
15
|
"unpkg": "./dist/format-css.umd.cjs",
|
|
16
16
|
"scripts": {
|
|
17
17
|
"build": "vite build",
|
|
18
|
-
"test": "uvu",
|
|
18
|
+
"test": "c8 --reporter=lcov uvu",
|
|
19
19
|
"check": "tsc",
|
|
20
|
-
"
|
|
20
|
+
"prettier": "prettier --check index.js test/**/*.js"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
+
"@codecov/vite-plugin": "^0.0.1-beta.10",
|
|
24
|
+
"@codspeed/tinybench-plugin": "^3.1.0",
|
|
23
25
|
"@types/css-tree": "^2.3.4",
|
|
24
|
-
"
|
|
26
|
+
"c8": "^10.1.2",
|
|
27
|
+
"prettier": "^3.3.3",
|
|
28
|
+
"tinybench": "^2.8.0",
|
|
25
29
|
"typescript": "^5.3.3",
|
|
26
30
|
"uvu": "^0.5.6",
|
|
27
31
|
"vite": "^5.2.11",
|
|
28
|
-
"vite-plugin-dts": "^
|
|
32
|
+
"vite-plugin-dts": "^4.0.0-beta.1"
|
|
29
33
|
},
|
|
30
34
|
"dependencies": {
|
|
31
35
|
"css-tree": "^2.3.1"
|
|
@@ -42,5 +46,11 @@
|
|
|
42
46
|
"prettifier",
|
|
43
47
|
"pretty",
|
|
44
48
|
"prettier"
|
|
45
|
-
]
|
|
49
|
+
],
|
|
50
|
+
"prettier": {
|
|
51
|
+
"semi": false,
|
|
52
|
+
"useTabs": true,
|
|
53
|
+
"printWidth": 140,
|
|
54
|
+
"singleQuote": true
|
|
55
|
+
}
|
|
46
56
|
}
|