@itcase/config 1.0.59 → 1.0.61
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/package.json +1 -1
- package/postcss/index.js +2 -2
- package/postcss/nextVite.js +114 -0
- package/postcss/require.cjs +3 -2
- package/postcss/require.js +3 -2
- package/postcss/requirePackage.cjs +1 -0
package/package.json
CHANGED
package/postcss/index.js
CHANGED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
const cssnano = [
|
|
2
|
+
'cssnano',
|
|
3
|
+
{
|
|
4
|
+
preset: 'cssnano-preset-default',
|
|
5
|
+
},
|
|
6
|
+
]
|
|
7
|
+
|
|
8
|
+
export default {
|
|
9
|
+
plugins: [
|
|
10
|
+
'postcss-normalize',
|
|
11
|
+
[
|
|
12
|
+
'postcss-prepend-imports',
|
|
13
|
+
{
|
|
14
|
+
path: 'src/styles/',
|
|
15
|
+
files: ['tokens.css', 'import.css'],
|
|
16
|
+
},
|
|
17
|
+
],
|
|
18
|
+
'postcss-import-ext-glob',
|
|
19
|
+
[
|
|
20
|
+
'postcss-import',
|
|
21
|
+
{
|
|
22
|
+
addModulesDirectories: ['node_modules'],
|
|
23
|
+
},
|
|
24
|
+
],
|
|
25
|
+
'postcss-each',
|
|
26
|
+
[
|
|
27
|
+
'postcss-convert-unit',
|
|
28
|
+
{
|
|
29
|
+
convertConfig: [
|
|
30
|
+
{
|
|
31
|
+
declConvertRules: [
|
|
32
|
+
{
|
|
33
|
+
value: (value) => value * 8,
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
declMatcher: {
|
|
37
|
+
sourceUnit: 'm',
|
|
38
|
+
targetUnit: 'px',
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
'postcss-flexbugs-fixes',
|
|
45
|
+
[
|
|
46
|
+
'postcss-preset-env',
|
|
47
|
+
{
|
|
48
|
+
features: {
|
|
49
|
+
'custom-properties': {
|
|
50
|
+
preserve: false,
|
|
51
|
+
},
|
|
52
|
+
'nesting-rules': false,
|
|
53
|
+
},
|
|
54
|
+
stage: 2,
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
'postcss-mixins',
|
|
58
|
+
// !process.env.STORYBOOK && [
|
|
59
|
+
// 'postcss-urlrewrite',
|
|
60
|
+
// {
|
|
61
|
+
// properties: ['src'],
|
|
62
|
+
// rules: [
|
|
63
|
+
// {
|
|
64
|
+
// from: '@itcase/tokens-am/dist/fonts/',
|
|
65
|
+
// to: `/fonts/`,
|
|
66
|
+
// },
|
|
67
|
+
// {
|
|
68
|
+
// from: '@itcase/tokens-baikal/dist/fonts/',
|
|
69
|
+
// to: `/fonts/`,
|
|
70
|
+
// },
|
|
71
|
+
// ],
|
|
72
|
+
// },
|
|
73
|
+
// ],
|
|
74
|
+
[
|
|
75
|
+
'postcss-url',
|
|
76
|
+
{
|
|
77
|
+
maxSize: 256,
|
|
78
|
+
url: 'inline',
|
|
79
|
+
filter: /\.(svg|png)$/,
|
|
80
|
+
},
|
|
81
|
+
],
|
|
82
|
+
'postcss-nested-ancestors',
|
|
83
|
+
'postcss-nested',
|
|
84
|
+
'postcss-hexrgba',
|
|
85
|
+
'postcss-easings',
|
|
86
|
+
[
|
|
87
|
+
'postcss-dark-theme-class',
|
|
88
|
+
{
|
|
89
|
+
darkSelector: '.dark-theme',
|
|
90
|
+
lightSelector: '.light-theme',
|
|
91
|
+
},
|
|
92
|
+
],
|
|
93
|
+
'postcss-combine-duplicated-selectors',
|
|
94
|
+
'postcss-discard-duplicates',
|
|
95
|
+
[
|
|
96
|
+
'postcss-pxtorem',
|
|
97
|
+
{
|
|
98
|
+
minPixelValue: 0,
|
|
99
|
+
propList: ['font', 'font-size', 'line-height', 'letter-spacing'],
|
|
100
|
+
rootValue: 16,
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
'postcss-merge-at-rules',
|
|
104
|
+
[
|
|
105
|
+
'postcss-sort-media-queries',
|
|
106
|
+
{
|
|
107
|
+
sort: 'mobile-first',
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
'postcss-extend-rule',
|
|
111
|
+
'@lehoczky/postcss-fluid',
|
|
112
|
+
...(process.env.NODE_ENV === 'development' ? [cssnano] : []),
|
|
113
|
+
],
|
|
114
|
+
}
|
package/postcss/require.cjs
CHANGED
|
@@ -36,9 +36,10 @@ module.exports = {
|
|
|
36
36
|
}),
|
|
37
37
|
require('postcss-mixins'),
|
|
38
38
|
require('postcss-url')({
|
|
39
|
-
maxSize:
|
|
39
|
+
maxSize: 256,
|
|
40
40
|
url: 'inline',
|
|
41
|
-
filter: /\.(svg|png|eot|woff|woff2|ttf)$/,
|
|
41
|
+
// filter: /\.(svg|png|eot|woff|woff2|ttf)$/,
|
|
42
|
+
filter: /\.(svg|png)$/,
|
|
42
43
|
}),
|
|
43
44
|
require('postcss-nested-ancestors'),
|
|
44
45
|
require('postcss-nested'),
|
package/postcss/require.js
CHANGED
|
@@ -36,9 +36,10 @@ module.exports = {
|
|
|
36
36
|
}),
|
|
37
37
|
require('postcss-mixins'),
|
|
38
38
|
require('postcss-url')({
|
|
39
|
-
maxSize:
|
|
39
|
+
maxSize: 256,
|
|
40
40
|
url: 'inline',
|
|
41
|
-
filter: /\.(svg|png|eot|woff|woff2|ttf)$/,
|
|
41
|
+
// filter: /\.(svg|png|eot|woff|woff2|ttf)$/,
|
|
42
|
+
filter: /\.(svg|png)$/,
|
|
42
43
|
}),
|
|
43
44
|
require('postcss-nested-ancestors'),
|
|
44
45
|
require('postcss-nested'),
|