@sumotto/configs 0.0.10 → 0.0.12

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.
@@ -6,6 +6,10 @@ require( 'dotenv' ).config( {
6
6
  path: [
7
7
  path.resolve( process.cwd(), '.env.local' ),
8
8
  path.resolve( process.cwd(), '.env' ),
9
+ path.resolve( process.cwd(), '../.env.local' ),
10
+ path.resolve( process.cwd(), '../.env' ),
11
+ path.resolve( process.cwd(), '../../.env.local' ),
12
+ path.resolve( process.cwd(), '../../.env' ),
9
13
  path.resolve( process.cwd(), '../../../.env.local' ),
10
14
  path.resolve( process.cwd(), '../../../.env' ),
11
15
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sumotto/configs",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "Configs for my work",
5
5
  "scripts": {
6
6
  "release": "np --yolo"
@@ -19,23 +19,26 @@
19
19
  },
20
20
  "homepage": "https://github.com/SumoTTo/configs#readme",
21
21
  "devDependencies": {
22
- "np": "^10.0.5"
22
+ "np": "^10.0.6"
23
23
  },
24
24
  "files": [
25
25
  "helpers/*",
26
26
  "wp/*"
27
27
  ],
28
28
  "dependencies": {
29
- "@wordpress/scripts": "^27.9.0",
29
+ "@wordpress/scripts": "^28.1.0",
30
30
  "clean-webpack-plugin": "^4.0.0",
31
31
  "copy-webpack-plugin": "^12.0.2",
32
32
  "dotenv": "^16.4.5",
33
33
  "find-free-port-sync": "^1.0.0",
34
- "glob": "^10.4.1",
35
- "image-minimizer-webpack-plugin": "^4.0.1",
34
+ "glob": "^10.4.2",
35
+ "image-minimizer-webpack-plugin": "^4.0.2",
36
+ "imagemin": "^9.0.0",
37
+ "imagemin-gifsicle": "^7.0.0",
38
+ "imagemin-jpegtran": "^7.0.0",
39
+ "imagemin-optipng": "^8.0.0",
36
40
  "mini-css-extract-plugin": "^2.9.0",
37
41
  "rtlcss-webpack-plugin": "^4.0.7",
38
- "sharp": "^0.33.4",
39
42
  "svgo": "^3.3.2",
40
43
  "webpack-remove-empty-scripts": "^1.0.4"
41
44
  },
package/wp/phpcs.xml CHANGED
@@ -23,6 +23,8 @@
23
23
  <properties>
24
24
  <property name="text_domain" type="array">
25
25
  <element value="theme" />
26
+ <element value="the-modifications" />
27
+ <element value="the-builder" />
26
28
  <element value="woocommerce" />
27
29
  <element value="default" />
28
30
  </property>
@@ -83,52 +83,38 @@ const defaultConfig = new Config( defaultConfigWP, 'default', port )
83
83
  )
84
84
  .addMinimizer(
85
85
  new ImageMinimizerPlugin( {
86
- minimizer: {
87
- implementation: ImageMinimizerPlugin.svgoMinify,
88
- options: {
89
- encodeOptions: {
90
- multipass: true,
91
- plugins: [
92
- {
93
- name: 'preset-default',
94
- params: {
95
- overrides: {
96
- removeViewBox: false,
97
- },
86
+ minimizer: [
87
+ {
88
+ implementation: ImageMinimizerPlugin.svgoMinify,
89
+ options: {
90
+ encodeOptions: {
91
+ multipass: true,
92
+ plugins: [
93
+ {
94
+ name: 'preset-default',
98
95
  },
99
- },
100
- {
101
- name: 'addAttributesToSVGElement',
102
- params: {
103
- attributes: [
104
- {
105
- 'aria-hidden': 'true',
106
- },
107
- ],
96
+ {
97
+ name: 'addAttributesToSVGElement',
98
+ params: {
99
+ attributes: [
100
+ {
101
+ 'aria-hidden': 'true',
102
+ },
103
+ ],
104
+ },
108
105
  },
109
- },
110
- ],
106
+ ],
107
+ },
111
108
  },
112
109
  },
113
- },
114
- } )
115
- )
116
- .addMinimizer(
117
- new ImageMinimizerPlugin( {
118
- minimizer: {
119
- implementation: ImageMinimizerPlugin.sharpMinify,
120
- },
121
- generator: [
122
110
  {
123
- type: 'asset',
124
- preset: 'avif',
125
- implementation: ImageMinimizerPlugin.sharpGenerate,
111
+ implementation: ImageMinimizerPlugin.imageminMinify,
126
112
  options: {
127
- encodeOptions: {
128
- avif: {
129
- lossless: false,
130
- },
131
- },
113
+ plugins: [
114
+ [ 'gifsicle' ],
115
+ [ 'jpegtran', { progressive: true } ],
116
+ [ 'optipng', { optimizationLevel: 5 } ],
117
+ ],
132
118
  },
133
119
  },
134
120
  ],
@@ -141,7 +127,11 @@ const modulesConfig = new Config( modulesConfigWP, 'modules' )
141
127
  .addEntries( 'src/scripts/modules/*.{j,t}s' );
142
128
 
143
129
  const patternsConfig = new Config(
144
- { entry: {}, mode: 'production' },
130
+ {
131
+ entry: {},
132
+ mode: 'production',
133
+ output: { path: resolve( process.cwd(), 'patterns/images' ) },
134
+ },
145
135
  'patterns'
146
136
  )
147
137
  .addPlugin(
@@ -149,7 +139,7 @@ const patternsConfig = new Config(
149
139
  patterns: [
150
140
  {
151
141
  from: 'src/images-for-patterns',
152
- to: '../patterns/images',
142
+ to: './',
153
143
  noErrorOnMissing: true,
154
144
  globOptions: {
155
145
  ignore: [ '**/readme.md' ],
@@ -160,47 +150,38 @@ const patternsConfig = new Config(
160
150
  )
161
151
  .addMinimizer(
162
152
  new ImageMinimizerPlugin( {
163
- minimizer: {
164
- implementation: ImageMinimizerPlugin.svgoMinify,
165
- options: {
166
- encodeOptions: {
167
- multipass: true,
168
- plugins: [
169
- {
170
- name: 'preset-default',
171
- },
172
- {
173
- name: 'addAttributesToSVGElement',
174
- params: {
175
- attributes: [
176
- {
177
- 'aria-hidden': 'true',
178
- },
179
- ],
153
+ minimizer: [
154
+ {
155
+ implementation: ImageMinimizerPlugin.svgoMinify,
156
+ options: {
157
+ encodeOptions: {
158
+ multipass: true,
159
+ plugins: [
160
+ {
161
+ name: 'preset-default',
180
162
  },
181
- },
182
- ],
163
+ {
164
+ name: 'addAttributesToSVGElement',
165
+ params: {
166
+ attributes: [
167
+ {
168
+ 'aria-hidden': 'true',
169
+ },
170
+ ],
171
+ },
172
+ },
173
+ ],
174
+ },
183
175
  },
184
176
  },
185
- },
186
- } )
187
- )
188
- .addMinimizer(
189
- new ImageMinimizerPlugin( {
190
- minimizer: {
191
- implementation: ImageMinimizerPlugin.sharpMinify,
192
- },
193
- generator: [
194
177
  {
195
- type: 'asset',
196
- preset: 'avif',
197
- implementation: ImageMinimizerPlugin.sharpGenerate,
178
+ implementation: ImageMinimizerPlugin.imageminMinify,
198
179
  options: {
199
- encodeOptions: {
200
- avif: {
201
- lossless: false,
202
- },
203
- },
180
+ plugins: [
181
+ [ 'gifsicle', { interlaced: true } ],
182
+ [ 'jpegtran', { progressive: true } ],
183
+ [ 'optipng', { optimizationLevel: 5 } ],
184
+ ],
204
185
  },
205
186
  },
206
187
  ],