chisel-scripts 2.1.1 → 2.1.2
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
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
<!-- INSERT-NEW-ENTRIES-HERE -->
|
|
4
4
|
|
|
5
|
+
## <small>2.1.2 (2025-12-16)</small>
|
|
6
|
+
|
|
7
|
+
- make icons module optional ([94e4c6c](https://github.com/xfiveco/generator-chisel/commit/94e4c6c))
|
|
8
|
+
|
|
5
9
|
## <small>2.1.1 (2025-12-16)</small>
|
|
6
10
|
|
|
7
11
|
- add wp interactivity api support, optimize css build, refactor webpack config ([319d822](https://github.com/xfiveco/generator-chisel/commit/319d822))
|
|
@@ -13,7 +13,10 @@ function loadExtensions() {
|
|
|
13
13
|
.sort();
|
|
14
14
|
|
|
15
15
|
return Promise.all(
|
|
16
|
-
files.map((file) =>
|
|
16
|
+
files.map(async (file) => {
|
|
17
|
+
const module = await import(pathToFileURL(join(extensionsDir, file)));
|
|
18
|
+
return { name: file, module };
|
|
19
|
+
})
|
|
17
20
|
);
|
|
18
21
|
}
|
|
19
22
|
|
|
@@ -24,14 +27,19 @@ export default function wpScripts(api) {
|
|
|
24
27
|
.option(
|
|
25
28
|
'--experimental-modules',
|
|
26
29
|
'do not enable experimental modules',
|
|
30
|
+
)
|
|
31
|
+
.option(
|
|
32
|
+
'--use-icons-module',
|
|
33
|
+
'Use icons generator (sprite) module'
|
|
27
34
|
),
|
|
28
35
|
async (options) => {
|
|
29
36
|
process.env.NODE_ENV = 'production';
|
|
30
37
|
|
|
31
38
|
for (const extension of await loadExtensions()) {
|
|
32
|
-
|
|
39
|
+
if (!extension.module.build || (extension.name === 'icons.mjs' && !options.useIconsModule)) continue;
|
|
40
|
+
|
|
33
41
|
|
|
34
|
-
await extension.build(api);
|
|
42
|
+
await extension.module.build(api);
|
|
35
43
|
}
|
|
36
44
|
|
|
37
45
|
const args = ['wp-scripts', 'build'];
|
|
@@ -52,6 +60,10 @@ export default function wpScripts(api) {
|
|
|
52
60
|
.option(
|
|
53
61
|
'--experimental-modules',
|
|
54
62
|
'do not enable experimental modules',
|
|
63
|
+
)
|
|
64
|
+
.option(
|
|
65
|
+
'--use-icons-module',
|
|
66
|
+
'Use icons generator (sprite) module'
|
|
55
67
|
),
|
|
56
68
|
async (options) => {
|
|
57
69
|
process.env.NODE_ENV = 'development';
|
|
@@ -59,15 +71,15 @@ export default function wpScripts(api) {
|
|
|
59
71
|
const extensions = await loadExtensions();
|
|
60
72
|
|
|
61
73
|
for (const extension of extensions) {
|
|
62
|
-
if (!extension.build) continue;
|
|
74
|
+
if (!extension.module.build || (extension.name === 'icons.mjs' && !options.useIconsModule)) continue;
|
|
63
75
|
|
|
64
|
-
await extension.build(api);
|
|
76
|
+
await extension.module.build(api);
|
|
65
77
|
}
|
|
66
78
|
|
|
67
79
|
for (const extension of extensions) {
|
|
68
|
-
if (!extension.
|
|
80
|
+
if (!extension.module.module.build || (extension.name === 'icons.mjs' && !options.useIconsModule)) continue;
|
|
69
81
|
|
|
70
|
-
await extension.start(api);
|
|
82
|
+
await extension.module.start(api);
|
|
71
83
|
}
|
|
72
84
|
|
|
73
85
|
const args = ['wp-scripts', 'start', '--hot'];
|
|
@@ -57,5 +57,8 @@ define( 'WP_DEBUG_DISPLAY', false );
|
|
|
57
57
|
define( 'SCRIPT_DEBUG', true );
|
|
58
58
|
define( 'WP_ENVIRONMENT_TYPE', 'development' );
|
|
59
59
|
|
|
60
|
+
// Icons module. Also requires packacke.json and scss configuration.
|
|
61
|
+
define( 'CHISEL_USE_ICONS_MODULE', false );
|
|
62
|
+
|
|
60
63
|
/** The Database Collate type. Don't change this if in doubt. */
|
|
61
64
|
define( 'DB_COLLATE', '' );
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chisel-scripts",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.2",
|
|
4
4
|
"description": "Chisel scripts",
|
|
5
5
|
"bin": {
|
|
6
6
|
"chisel-scripts": "bin/chisel-scripts.js"
|
|
@@ -39,5 +39,5 @@
|
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"@wordpress/scripts": "^27.9.0 || ^31.0.0 || ^31.1.0"
|
|
41
41
|
},
|
|
42
|
-
"gitHead": "
|
|
42
|
+
"gitHead": "54768b8dd93e3773c3659f28445c9c6d76a2819c"
|
|
43
43
|
}
|