@airfleet/generator-init 0.23.3 → 0.24.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/generators/plugin/templates/composer-scoped.json.ejs +1 -1
- package/generators/plugin/templates/composer-scoped.lock.ejs +8 -8
- package/generators/view/prompts.js +12 -4
- package/generators/view/templates/blocks/blocks-group.json.ejs +1 -1
- package/generators/view/templates.js +11 -3
- package/package.json +1 -1
|
@@ -4,20 +4,20 @@
|
|
|
4
4
|
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
|
5
5
|
"This file is @generated automatically"
|
|
6
6
|
],
|
|
7
|
-
"content-hash": "
|
|
7
|
+
"content-hash": "1787fbb0ba310171876319b249557892",
|
|
8
8
|
"packages": [
|
|
9
9
|
{
|
|
10
10
|
"name": "airfleet/wordpress-framework",
|
|
11
|
-
"version": "1.
|
|
11
|
+
"version": "1.2.1",
|
|
12
12
|
"source": {
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "https://github.com/airfleet/airfleet-wordpress-framework-php.git",
|
|
15
|
-
"reference": "
|
|
15
|
+
"reference": "f226882d99d9fa55de2801bbc81fab02fd346c22"
|
|
16
16
|
},
|
|
17
17
|
"dist": {
|
|
18
18
|
"type": "zip",
|
|
19
|
-
"url": "https://api.github.com/repos/airfleet/airfleet-wordpress-framework-php/zipball/
|
|
20
|
-
"reference": "
|
|
19
|
+
"url": "https://api.github.com/repos/airfleet/airfleet-wordpress-framework-php/zipball/f226882d99d9fa55de2801bbc81fab02fd346c22",
|
|
20
|
+
"reference": "f226882d99d9fa55de2801bbc81fab02fd346c22",
|
|
21
21
|
"shasum": ""
|
|
22
22
|
},
|
|
23
23
|
"require": {
|
|
@@ -40,9 +40,9 @@
|
|
|
40
40
|
"description": "Airfleet framework for WordPress",
|
|
41
41
|
"support": {
|
|
42
42
|
"issues": "https://github.com/airfleet/airfleet-wordpress-framework-php/issues",
|
|
43
|
-
"source": "https://github.com/airfleet/airfleet-wordpress-framework-php/tree/1.
|
|
43
|
+
"source": "https://github.com/airfleet/airfleet-wordpress-framework-php/tree/1.2.1"
|
|
44
44
|
},
|
|
45
|
-
"time": "
|
|
45
|
+
"time": "2024-02-08T16:31:31+00:00"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"name": "jawira/case-converter",
|
|
@@ -120,5 +120,5 @@
|
|
|
120
120
|
"prefer-lowest": false,
|
|
121
121
|
"platform": [],
|
|
122
122
|
"platform-dev": [],
|
|
123
|
-
"plugin-api-version": "2.
|
|
123
|
+
"plugin-api-version": "2.6.0"
|
|
124
124
|
}
|
|
@@ -279,12 +279,16 @@ export default class {
|
|
|
279
279
|
return {
|
|
280
280
|
type: "checkbox",
|
|
281
281
|
name: "styles",
|
|
282
|
-
message: "Which
|
|
282
|
+
message: "Which stylesheets to create?",
|
|
283
283
|
choices: [
|
|
284
|
+
{
|
|
285
|
+
name: "Default, no-suffix (applies to frontend and editor)",
|
|
286
|
+
value: "default",
|
|
287
|
+
checked: true,
|
|
288
|
+
},
|
|
284
289
|
{
|
|
285
290
|
name: "Frontend",
|
|
286
291
|
value: "frontend",
|
|
287
|
-
checked: true,
|
|
288
292
|
},
|
|
289
293
|
{
|
|
290
294
|
name: "Critical",
|
|
@@ -307,12 +311,16 @@ export default class {
|
|
|
307
311
|
return {
|
|
308
312
|
type: "checkbox",
|
|
309
313
|
name: "scripts",
|
|
310
|
-
message: "Which
|
|
314
|
+
message: "Which script files to create?",
|
|
311
315
|
choices: [
|
|
316
|
+
{
|
|
317
|
+
name: "Default, no-suffix (applies to frontend and editor)",
|
|
318
|
+
value: "default",
|
|
319
|
+
checked: true,
|
|
320
|
+
},
|
|
312
321
|
{
|
|
313
322
|
name: "Frontend",
|
|
314
323
|
value: "frontend",
|
|
315
|
-
checked: true,
|
|
316
324
|
},
|
|
317
325
|
{
|
|
318
326
|
name: "Critical",
|
|
@@ -33,9 +33,12 @@ export default class {
|
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
_acfTemplate() {
|
|
36
|
+
const isNaturalName = this.generator.viewType.slug === "blocks" || this.generator.viewType.slug === "components" || this.generator.viewType.slug === "custom-templates";
|
|
37
|
+
const filename = isNaturalName ? `${this.generator.name.slug}.acf-group.json` : `${this.generator.acf.key}.json`;
|
|
38
|
+
|
|
36
39
|
return {
|
|
37
40
|
template: `${this.generator.viewType.slug}/${this.generator.viewType.slug}-group.json.ejs`,
|
|
38
|
-
destination: `${this.generator.viewFolder}/${
|
|
41
|
+
destination: `${this.generator.viewFolder}/${filename}`,
|
|
39
42
|
isEnabled: this.generator.answers.createCustomFields,
|
|
40
43
|
};
|
|
41
44
|
}
|
|
@@ -75,6 +78,11 @@ export default class {
|
|
|
75
78
|
{
|
|
76
79
|
template,
|
|
77
80
|
destination: `${this.generator.viewFolder}/${this.generator.name.slug}.${extension}`,
|
|
81
|
+
isEnabled: this._styleEnabled("default"),
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
template,
|
|
85
|
+
destination: `${this.generator.viewFolder}/${this.generator.name.slug}.frontend.${extension}`,
|
|
78
86
|
isEnabled: this._styleEnabled("frontend"),
|
|
79
87
|
},
|
|
80
88
|
{
|
|
@@ -96,10 +104,10 @@ export default class {
|
|
|
96
104
|
}
|
|
97
105
|
|
|
98
106
|
_scriptsTemplates() {
|
|
99
|
-
const screens = ["frontend", "critical", "editor", "admin"];
|
|
107
|
+
const screens = ["default", "frontend", "critical", "editor", "admin"];
|
|
100
108
|
|
|
101
109
|
return screens.map((screen) => {
|
|
102
|
-
const suffix = screen === "
|
|
110
|
+
const suffix = screen === "default" ? "" : `.${screen}`;
|
|
103
111
|
const extension = this.generator.answers.source === "starter-theme" ? "js" : "entry.js";
|
|
104
112
|
|
|
105
113
|
return {
|