@ideasonpurpose/build-tools-wordpress 2.5.0 → 2.6.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/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,22 @@ All notable changes to this project will be documented in this file. Dates are d
|
|
|
4
4
|
|
|
5
5
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
6
6
|
|
|
7
|
+
#### v2.5.1
|
|
8
|
+
|
|
9
|
+
> 8 March 2026
|
|
10
|
+
|
|
11
|
+
- add rimraf
|
|
12
|
+
- add SVG processing details to README
|
|
13
|
+
- add comment for runner images in release workflow
|
|
14
|
+
|
|
15
|
+
#### v2.5.0
|
|
16
|
+
|
|
17
|
+
> 7 March 2026
|
|
18
|
+
|
|
19
|
+
- bump deps
|
|
20
|
+
- beginning of typing, some cleanup
|
|
21
|
+
- inline SVGs in SCSS files by default
|
|
22
|
+
|
|
7
23
|
#### v2.4.2
|
|
8
24
|
|
|
9
25
|
> 22 December 2025
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @ideasonpurpose/build-tools-wordpress
|
|
2
2
|
|
|
3
|
-
#### Version 2.
|
|
3
|
+
#### Version 2.6.0
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/@ideasonpurpose/build-tools-wordpress)
|
|
6
6
|
[](https://github.com/ideasonpurpose/build-tools-wordpress#readme)
|
|
@@ -29,6 +29,18 @@ Each project may optionally include an **ideasonpurpose.config.js** file in the
|
|
|
29
29
|
|
|
30
30
|
-->
|
|
31
31
|
|
|
32
|
+
## SVG Processing
|
|
33
|
+
|
|
34
|
+
Webpack handles SVG files differently based on import context:
|
|
35
|
+
|
|
36
|
+
- **In SCSS files**: SVGs referenced via `url('file.svg')` are inlined as data URIs if under 4KB, otherwise emitted as separate files in the output directory.
|
|
37
|
+
|
|
38
|
+
- **In JS/TSX files**:
|
|
39
|
+
- With `?url` query (e.g., `import svg from 'file.svg?url'`): Treated as assets, inlined as data URIs if under 4KB, else files.
|
|
40
|
+
- Without `?url`: Converted to React components using `@svgr/webpack` for direct JSX usage.
|
|
41
|
+
|
|
42
|
+
Data URIs are generated as `data:image/svg+xml,<url-encoded-content>` using more efficient URL-encoding, not base64.
|
|
43
|
+
|
|
32
44
|
## Local Development
|
|
33
45
|
|
|
34
46
|
Because this project makes use of bin scripts, conventional `npm link` workflows won't work correctly. To work on this code in a development project, change the project's package.json to install from a local file path, probably something like this:
|
package/config/webpack.config.js
CHANGED
|
@@ -186,6 +186,7 @@ export default async (env) => {
|
|
|
186
186
|
|
|
187
187
|
loadPaths: [
|
|
188
188
|
path.resolve(config.src, "sass"),
|
|
189
|
+
path.resolve(config.src, "styles"),
|
|
189
190
|
path.resolve(siteDir, "node_modules"),
|
|
190
191
|
],
|
|
191
192
|
},
|
|
@@ -302,9 +303,10 @@ export default async (env) => {
|
|
|
302
303
|
hot: true, // Enable hot module replacement with fallback to full reload
|
|
303
304
|
|
|
304
305
|
// hot: "only",
|
|
305
|
-
static:
|
|
306
|
-
watch: false,
|
|
307
|
-
|
|
306
|
+
static: [
|
|
307
|
+
{ directory: config.dist, watch: false },
|
|
308
|
+
{ directory: config.src, publicPath: config.publicPath.replace('/dist/', '/src/'), watch: false },
|
|
309
|
+
],
|
|
308
310
|
|
|
309
311
|
client: {
|
|
310
312
|
logging: "verbose",
|
|
@@ -486,7 +488,7 @@ export default async (env) => {
|
|
|
486
488
|
dot: true, // TODO: Dangerous? Why is this ever necessary?!
|
|
487
489
|
ignore: [
|
|
488
490
|
"**/{.gitignore,.DS_Store,*:Zone.Identifier}",
|
|
489
|
-
config.src + "/{block,blocks,fonts,js,sass}/**",
|
|
491
|
+
config.src + "/{block,blocks,fonts,js,sass,styles}/**",
|
|
490
492
|
],
|
|
491
493
|
},
|
|
492
494
|
noErrorOnMissing: true,
|
|
@@ -24,7 +24,7 @@ export class DependencyManifestPlugin {
|
|
|
24
24
|
// Object.keys(compilation),
|
|
25
25
|
// );
|
|
26
26
|
|
|
27
|
-
console.log(Array.from(compilation.namedChunkGroups.keys()))
|
|
27
|
+
// console.log(Array.from(compilation.namedChunkGroups.keys()))
|
|
28
28
|
|
|
29
29
|
Array.from(compilation.namedChunkGroups.entries()).forEach(
|
|
30
30
|
([key, group]) => {
|
|
@@ -76,7 +76,7 @@ export class DependencyManifestPlugin {
|
|
|
76
76
|
},
|
|
77
77
|
);
|
|
78
78
|
|
|
79
|
-
console.log(this.manifest);
|
|
79
|
+
// console.log(this.manifest);
|
|
80
80
|
|
|
81
81
|
callback();
|
|
82
82
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ideasonpurpose/build-tools-wordpress",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"description": "Build scripts and dependencies for IOP's WordPress development environments.",
|
|
5
5
|
"homepage": "https://github.com/ideasonpurpose/build-tools-wordpress#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"archiver": "^7.0.1",
|
|
46
46
|
"auto-changelog": "^2.5.0",
|
|
47
47
|
"autoprefixer": "^10.4.27",
|
|
48
|
-
"babel-loader": "^10.1.
|
|
49
|
-
"caniuse-lite": "^1.0.
|
|
48
|
+
"babel-loader": "^10.1.1",
|
|
49
|
+
"caniuse-lite": "^1.0.30001778",
|
|
50
50
|
"chalk": "^5.6.2",
|
|
51
51
|
"chalk-cli": "^6.0.0",
|
|
52
52
|
"classnames": "^2.5.1",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"image-minimizer-webpack-plugin": "^5.0.0",
|
|
69
69
|
"is-text-path": "^3.0.0",
|
|
70
70
|
"lodash": "^4.17.23",
|
|
71
|
-
"mini-css-extract-plugin": "^2.10.
|
|
71
|
+
"mini-css-extract-plugin": "^2.10.1",
|
|
72
72
|
"ora": "^9.3.0",
|
|
73
73
|
"postcss": "^8.5.8",
|
|
74
74
|
"postcss-loader": "^8.2.1",
|
|
@@ -77,7 +77,8 @@
|
|
|
77
77
|
"pretty-hrtime": "^1.0.3",
|
|
78
78
|
"read-package-up": "^12.0.0",
|
|
79
79
|
"replacestream": "^4.0.3",
|
|
80
|
-
"
|
|
80
|
+
"rimraf": "^6.1.3",
|
|
81
|
+
"sass-embedded": "^1.98.0",
|
|
81
82
|
"sass-loader": "^16.0.7",
|
|
82
83
|
"semver": "^7.7.4",
|
|
83
84
|
"sharp": "^0.34.5",
|
|
@@ -97,8 +98,8 @@
|
|
|
97
98
|
"webpack-cli": "^6.0.1"
|
|
98
99
|
},
|
|
99
100
|
"devDependencies": {
|
|
100
|
-
"@vitest/coverage-v8": "^4.0
|
|
101
|
-
"vitest": "^4.0
|
|
101
|
+
"@vitest/coverage-v8": "^4.1.0",
|
|
102
|
+
"vitest": "^4.1.0"
|
|
102
103
|
},
|
|
103
104
|
"version-everything": {
|
|
104
105
|
"files": [
|