@itcase/config 1.0.65 → 1.0.67

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/postcss/nextVite.js +80 -89
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@itcase/config",
3
- "version": "1.0.65",
3
+ "version": "1.0.67",
4
4
  "author": "ITCase",
5
5
  "description": "Config",
6
6
  "engines": {
@@ -1,98 +1,89 @@
1
- const cssnano = [
2
- 'cssnano',
3
- {
4
- preset: 'cssnano-preset-default',
5
- },
6
- ]
1
+ import lehoczkyPostcssFluid from '@lehoczky/postcss-fluid'
2
+ import cssnano from 'cssnano'
3
+ import postcssCombineDuplicatedSelectors from 'postcss-combine-duplicated-selectors'
4
+ import postcssConvertUnit from 'postcss-convert-unit'
5
+ import postcssDarkThemeClass from 'postcss-dark-theme-class'
6
+ import postcssDiscardDuplicates from 'postcss-discard-duplicates'
7
+ import postcssEach from 'postcss-each'
8
+ import postcssEasings from 'postcss-easings'
9
+ import postcssExtendRule from 'postcss-extend-rule'
10
+ import postcssFlexbugsFixes from 'postcss-flexbugs-fixes'
11
+ import postcssHexRgba from 'postcss-hexrgba'
12
+ import postcssImport from 'postcss-import'
13
+ import postcssImportExtGlob from 'postcss-import-ext-glob'
14
+ import postcssMergeAtRules from 'postcss-merge-at-rules'
15
+ import postcssMixins from 'postcss-mixins'
16
+ import postcssNested from 'postcss-nested'
17
+ import postcssNestedAncestors from 'postcss-nested-ancestors'
18
+ import postcssNormalize from 'postcss-normalize'
19
+ import postcssPrependImports from 'postcss-prepend-imports'
20
+ import postcssPresetEnv from 'postcss-preset-env'
21
+ import postcssPxtorem from 'postcss-pxtorem'
22
+ import postcssSortMediaQueries from 'postcss-sort-media-queries'
23
+ import postcssUrl from 'postcss-url'
7
24
 
8
25
  export default {
9
26
  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',
27
+ postcssNormalize,
28
+ postcssPrependImports({
29
+ path: 'src/styles/',
30
+ files: ['tokens.css', 'import.css'],
31
+ }),
32
+ postcssImportExtGlob,
33
+ postcssImport({ addModulesDirectories: ['node_modules'] }),
34
+ postcssEach,
35
+ postcssConvertUnit({
36
+ convertConfig: [
37
+ {
38
+ declConvertRules: [
39
+ {
40
+ value: (value) => value * 8,
39
41
  },
42
+ ],
43
+ declMatcher: {
44
+ sourceUnit: 'm',
45
+ targetUnit: 'px',
40
46
  },
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
47
  },
54
- stage: 2,
55
- },
56
- ],
57
- 'postcss-mixins',
58
- [
59
- 'postcss-url',
60
- {
61
- maxSize: 256,
62
- url: 'inline',
63
- filter: /\.(svg|png)$/,
64
- },
65
- ],
66
- 'postcss-nested-ancestors',
67
- 'postcss-nested',
68
- 'postcss-hexrgba',
69
- 'postcss-easings',
70
- [
71
- 'postcss-dark-theme-class',
72
- {
73
- darkSelector: '.dark-theme',
74
- lightSelector: '.light-theme',
75
- },
76
- ],
77
- 'postcss-combine-duplicated-selectors',
78
- 'postcss-discard-duplicates',
79
- [
80
- 'postcss-pxtorem',
81
- {
82
- minPixelValue: 0,
83
- propList: ['font', 'font-size', 'line-height', 'letter-spacing'],
84
- rootValue: 16,
85
- },
86
- ],
87
- 'postcss-merge-at-rules',
88
- [
89
- 'postcss-sort-media-queries',
90
- {
91
- sort: 'mobile-first',
48
+ ],
49
+ }),
50
+ postcssFlexbugsFixes,
51
+ postcssPresetEnv({
52
+ features: {
53
+ 'custom-properties': {
54
+ preserve: false,
55
+ },
56
+ 'nesting-rules': false,
92
57
  },
93
- ],
94
- 'postcss-extend-rule',
95
- '@lehoczky/postcss-fluid',
96
- ...(process.env.NODE_ENV === 'development' ? [cssnano] : []),
58
+ stage: 2,
59
+ }),
60
+ postcssMixins,
61
+ postcssUrl({
62
+ maxSize: 256,
63
+ url: 'inline',
64
+ filter: /\\.(svg|png)$/,
65
+ }),
66
+ postcssNestedAncestors,
67
+ postcssNested,
68
+ postcssHexRgba,
69
+ postcssEasings,
70
+ postcssDarkThemeClass({
71
+ darkSelector: '.dark-theme',
72
+ lightSelector: '.light-theme',
73
+ }),
74
+ postcssCombineDuplicatedSelectors,
75
+ postcssDiscardDuplicates,
76
+ postcssPxtorem({
77
+ minPixelValue: 0,
78
+ propList: ['font', 'font-size', 'line-height', 'letter-spacing'],
79
+ rootValue: 16,
80
+ }),
81
+ postcssMergeAtRules(),
82
+ postcssSortMediaQueries({
83
+ sort: 'mobile-first',
84
+ }),
85
+ postcssExtendRule,
86
+ lehoczkyPostcssFluid,
97
87
  ],
88
+ ...(process.env.NODE_ENV === 'production' && { plugins: { cssnano } }),
98
89
  }