@airfleet/generator-init 0.30.0 → 0.31.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 +122 -122
- package/generators/plugin/templates/gitignore +1 -0
- package/generators/plugin/templates/package.json.ejs +1 -1
- package/generators/project-plugin/index.js +229 -0
- package/generators/project-plugin/templates/.airfleet-release +1 -0
- package/generators/project-plugin/templates/.editorconfig +18 -0
- package/generators/project-plugin/templates/.env +0 -0
- package/generators/project-plugin/templates/.gitattributes +12 -0
- package/generators/project-plugin/templates/.github/workflows/create-asana-attachment.yaml +19 -0
- package/generators/project-plugin/templates/.github/workflows/test-wordpress.yml +44 -0
- package/generators/project-plugin/templates/.husky/gitignore +1 -0
- package/generators/project-plugin/templates/.husky/pre-commit +4 -0
- package/generators/project-plugin/templates/.parcelrc +4 -0
- package/generators/project-plugin/templates/.prettierignore +15 -0
- package/generators/project-plugin/templates/.vscode/airfleet.code-snippets.ejs +186 -0
- package/generators/project-plugin/templates/.vscode/settings.json +33 -0
- package/generators/project-plugin/templates/CHANGELOG.md +10 -0
- package/generators/project-plugin/templates/LICENSE.ejs +2 -0
- package/generators/project-plugin/templates/README.md.ejs +16 -0
- package/generators/project-plugin/templates/acf-json/.gitkeep +0 -0
- package/generators/project-plugin/templates/acf-json/field-groups/.gitkeep +0 -0
- package/generators/project-plugin/templates/acf-json/option-pages/.gitkeep +0 -0
- package/generators/project-plugin/templates/acf-json/option-pages/airfleet-site-settings.json +22 -0
- package/generators/project-plugin/templates/acf-json/post-types/.gitkeep +0 -0
- package/generators/project-plugin/templates/acf-json/taxonomies/.gitkeep +0 -0
- package/generators/project-plugin/templates/assets/admin/styles/admin.entry.scss +2 -0
- package/generators/project-plugin/templates/assets/editor/styles/editor.entry.scss +23 -0
- package/generators/project-plugin/templates/assets/frontend/fonts/.gitkeep +0 -0
- package/generators/project-plugin/templates/assets/frontend/images/.gitkeep +0 -0
- package/generators/project-plugin/templates/assets/frontend/scripts/index.entry.js +3 -0
- package/generators/project-plugin/templates/assets/frontend/styles/_main.scss +3 -0
- package/generators/project-plugin/templates/assets/frontend/styles/_placeholders.scss +3 -0
- package/generators/project-plugin/templates/assets/frontend/styles/_root.scss +4 -0
- package/generators/project-plugin/templates/assets/frontend/styles/critical.entry.scss +1 -0
- package/generators/project-plugin/templates/assets/frontend/styles/index.entry.scss +6 -0
- package/generators/project-plugin/templates/assets/frontend/styles/main/_body.scss +6 -0
- package/generators/project-plugin/templates/assets/frontend/styles/main/_reset.scss +121 -0
- package/generators/project-plugin/templates/assets/frontend/styles/placeholders/_button.scss +43 -0
- package/generators/project-plugin/templates/assets/frontend/styles/placeholders/_container.scss +12 -0
- package/generators/project-plugin/templates/assets/frontend/styles/placeholders/_sections.scss +6 -0
- package/generators/project-plugin/templates/assets/frontend/styles/root/_fonts.scss +21 -0
- package/generators/project-plugin/templates/assets/login/.gitkeep +0 -0
- package/generators/project-plugin/templates/assets/shared/styles/_figma-variables.scss +7 -0
- package/generators/project-plugin/templates/assets/shared/styles/_lib.scss +4 -0
- package/generators/project-plugin/templates/assets/shared/styles/_root.scss +6 -0
- package/generators/project-plugin/templates/assets/shared/styles/_shared.scss +1 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/_mixins.scss +6 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/_scss-variables.scss +2 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_background.scss +11 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_body.scss +4 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_breakpoints.scss +79 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_helpers.scss +35 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_list-inline.scss +23 -0
- package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_position.scss +24 -0
- package/generators/project-plugin/templates/composer-scoped.json.ejs +8 -0
- package/generators/project-plugin/templates/composer-scoped.lock.ejs +124 -0
- package/generators/project-plugin/templates/composer.json.ejs +52 -0
- package/generators/project-plugin/templates/figma/design-tokens/.gitkeep +0 -0
- package/generators/project-plugin/templates/figma/design-tokens/manifest.json +5 -0
- package/generators/project-plugin/templates/gitignore +15 -0
- package/generators/project-plugin/templates/inc/Features/Menus.php.ejs +22 -0
- package/generators/project-plugin/templates/inc/Setup/AjaxVariables.php.ejs +22 -0
- package/generators/project-plugin/templates/inc/Setup/AjaxVariablesAdmin.php.ejs +22 -0
- package/generators/project-plugin/templates/inc/Setup/Breakpoints.php.ejs +18 -0
- package/generators/project-plugin/templates/inc/Setup/Colors.php.ejs +17 -0
- package/generators/project-plugin/templates/inc/Setup/RegisterViews.php.ejs +64 -0
- package/generators/project-plugin/templates/inc/Setup.php.ejs +30 -0
- package/generators/project-plugin/templates/index.php +1 -0
- package/generators/project-plugin/templates/package.json.ejs +85 -0
- package/generators/project-plugin/templates/phpcs.xml.ejs +23 -0
- package/generators/project-plugin/templates/plugin-name.php.ejs +65 -0
- package/generators/project-plugin/templates/scoper.custom.php.ejs +8 -0
- package/generators/project-plugin/templates/views/blocks/.gitkeep +0 -0
- package/generators/project-plugin/templates/views/components/.gitkeep +0 -0
- package/generators/project-plugin/templates/views/custom-templates/.gitkeep +0 -0
- package/generators/project-plugin/templates/views/parcelkeep.entry.scss +0 -0
- package/generators/project-plugin/templates/views/partials/footer/footer.blade.php.ejs +4 -0
- package/generators/project-plugin/templates/views/partials/footer/footer.php.ejs +4 -0
- package/generators/project-plugin/templates/views/partials/header/header.blade.php.ejs +12 -0
- package/generators/project-plugin/templates/views/partials/header/header.php.ejs +12 -0
- package/generators/project-plugin/templates/views/partials/layout/layout.blade.php.ejs +3 -0
- package/generators/project-plugin/templates/views/partials/layout/layout.php.ejs +5 -0
- package/generators/project-plugin/templates/views/templates/index/index.blade.php.ejs +30 -0
- package/generators/project-plugin/templates/views/templates/index/index.php.ejs +32 -0
- package/generators/project-plugin/templates/views/templates/not-found/not-found.blade.php.ejs +3 -0
- package/generators/project-plugin/templates/views/templates/not-found/not-found.php.ejs +5 -0
- package/generators/project-plugin/templates/views/templates/page/page.blade.php.ejs +10 -0
- package/generators/project-plugin/templates/views/templates/page/page.php.ejs +12 -0
- package/generators/project-plugin/templates/views/templates/single/single.blade.php.ejs +28 -0
- package/generators/project-plugin/templates/views/templates/single/single.php.ejs +30 -0
- package/generators/project-plugin/templates/views-elements/.gitkeep +0 -0
- package/generators/project-plugin/templates/views-elements/partials/button/ButtonSetup.php.ejs +32 -0
- package/generators/project-plugin/templates/views-elements/partials/button/button.entry.scss +13 -0
- package/package.json +1 -1
|
@@ -1,124 +1,124 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
2
|
+
"_readme": [
|
|
3
|
+
"This file locks the dependencies of your project to a known state",
|
|
4
|
+
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
|
5
|
+
"This file is @generated automatically"
|
|
6
|
+
],
|
|
7
|
+
"content-hash": "9c5f20589b695e0465c3e3f17445638a",
|
|
8
|
+
"packages": [
|
|
9
|
+
{
|
|
10
|
+
"name": "airfleet/wordpress-framework",
|
|
11
|
+
"version": "1.5.0",
|
|
12
|
+
"source": {
|
|
13
|
+
"type": "git",
|
|
14
|
+
"url": "https://github.com/airfleet/airfleet-wordpress-framework-php.git",
|
|
15
|
+
"reference": "5847995d05980b5215458b8cacd74d223a5e0d8b"
|
|
16
|
+
},
|
|
17
|
+
"dist": {
|
|
18
|
+
"type": "zip",
|
|
19
|
+
"url": "https://api.github.com/repos/airfleet/airfleet-wordpress-framework-php/zipball/5847995d05980b5215458b8cacd74d223a5e0d8b",
|
|
20
|
+
"reference": "5847995d05980b5215458b8cacd74d223a5e0d8b",
|
|
21
|
+
"shasum": ""
|
|
22
|
+
},
|
|
23
|
+
"require": {
|
|
24
|
+
"jawira/case-converter": "^3.5",
|
|
25
|
+
"php": ">=8.0"
|
|
26
|
+
},
|
|
27
|
+
"type": "library",
|
|
28
|
+
"autoload": {
|
|
29
|
+
"psr-4": {
|
|
30
|
+
"Airfleet\\Framework\\": "inc/"
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"notification-url": "https://packagist.org/downloads/",
|
|
34
|
+
"authors": [
|
|
35
|
+
{
|
|
36
|
+
"name": "Airfleet",
|
|
37
|
+
"email": "dev@airfleet.co"
|
|
38
|
+
}
|
|
39
|
+
],
|
|
40
|
+
"description": "Airfleet framework for WordPress",
|
|
41
|
+
"support": {
|
|
42
|
+
"issues": "https://github.com/airfleet/airfleet-wordpress-framework-php/issues",
|
|
43
|
+
"source": "https://github.com/airfleet/airfleet-wordpress-framework-php/tree/1.5.0"
|
|
44
|
+
},
|
|
45
|
+
"time": "2024-05-28T17:03:25+00:00"
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"name": "jawira/case-converter",
|
|
49
|
+
"version": "v3.5.1",
|
|
50
|
+
"source": {
|
|
51
|
+
"type": "git",
|
|
52
|
+
"url": "https://github.com/jawira/case-converter.git",
|
|
53
|
+
"reference": "2be05b98dcb743bef60ab6f849145bd3434ed003"
|
|
54
|
+
},
|
|
55
|
+
"dist": {
|
|
56
|
+
"type": "zip",
|
|
57
|
+
"url": "https://api.github.com/repos/jawira/case-converter/zipball/2be05b98dcb743bef60ab6f849145bd3434ed003",
|
|
58
|
+
"reference": "2be05b98dcb743bef60ab6f849145bd3434ed003",
|
|
59
|
+
"shasum": ""
|
|
60
|
+
},
|
|
61
|
+
"require": {
|
|
62
|
+
"ext-mbstring": "*",
|
|
63
|
+
"php": ">=7.4"
|
|
64
|
+
},
|
|
65
|
+
"require-dev": {
|
|
66
|
+
"behat/behat": "^3.0",
|
|
67
|
+
"phpstan/phpstan": "^1.0",
|
|
68
|
+
"phpunit/phpunit": "^9.0",
|
|
69
|
+
"vimeo/psalm": "^4.0"
|
|
70
|
+
},
|
|
71
|
+
"suggest": {
|
|
72
|
+
"pds/skeleton": "PHP Package Development Standards",
|
|
73
|
+
"phing/phing": "PHP Build Tool"
|
|
74
|
+
},
|
|
75
|
+
"type": "library",
|
|
76
|
+
"autoload": {
|
|
77
|
+
"psr-4": {
|
|
78
|
+
"Jawira\\CaseConverter\\": "src/"
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"notification-url": "https://packagist.org/downloads/",
|
|
82
|
+
"license": [
|
|
83
|
+
"MIT"
|
|
84
|
+
],
|
|
85
|
+
"authors": [
|
|
86
|
+
{
|
|
87
|
+
"name": "Jawira Portugal",
|
|
88
|
+
"email": "dev@tugal.be"
|
|
89
|
+
}
|
|
90
|
+
],
|
|
91
|
+
"description": "Convert strings between 13 naming conventions: Snake case, Camel case, Pascal case, Kebab case, Ada case, Train case, Cobol case, Macro case, Upper case, Lower case, Sentence case, Title case and Dot notation.",
|
|
92
|
+
"homepage": "https://jawira.github.io/case-converter/",
|
|
93
|
+
"keywords": [
|
|
94
|
+
"Ada case",
|
|
95
|
+
"Cobol case",
|
|
96
|
+
"Macro case",
|
|
97
|
+
"Train case",
|
|
98
|
+
"camel case",
|
|
99
|
+
"dot notation",
|
|
100
|
+
"kebab case",
|
|
101
|
+
"lower case",
|
|
102
|
+
"pascal case",
|
|
103
|
+
"sentence case",
|
|
104
|
+
"snake case",
|
|
105
|
+
"title case",
|
|
106
|
+
"upper case"
|
|
107
|
+
],
|
|
108
|
+
"support": {
|
|
109
|
+
"issues": "https://github.com/jawira/case-converter/issues",
|
|
110
|
+
"source": "https://github.com/jawira/case-converter/tree/v3.5.1"
|
|
111
|
+
},
|
|
112
|
+
"time": "2022-08-14T11:40:18+00:00"
|
|
113
|
+
}
|
|
114
|
+
],
|
|
115
|
+
"packages-dev": [],
|
|
116
|
+
"aliases": [],
|
|
117
|
+
"minimum-stability": "stable",
|
|
118
|
+
"stability-flags": [],
|
|
119
|
+
"prefer-stable": false,
|
|
120
|
+
"prefer-lowest": false,
|
|
121
|
+
"platform": [],
|
|
122
|
+
"platform-dev": [],
|
|
123
|
+
"plugin-api-version": "2.6.0"
|
|
124
124
|
}
|
|
@@ -0,0 +1,229 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import Generator from "yeoman-generator";
|
|
3
|
+
import { paramCase } from "change-case";
|
|
4
|
+
|
|
5
|
+
import nameCases from "../../utils/nameCases.js";
|
|
6
|
+
import copyTemplates from "../../utils/copyTemplates.js";
|
|
7
|
+
import mapFilesToTemplates from "../../utils/mapFilesToTemplates.js";
|
|
8
|
+
import requiredText from "../../utils/validation/requiredText.js";
|
|
9
|
+
import title from "../../utils/log/title.js";
|
|
10
|
+
import highlightText from "../../utils/log/text/highlightText.js";
|
|
11
|
+
import lines from "../../utils/log/text/lines.js";
|
|
12
|
+
import infoBox from "../../utils/log/boxes/infoBox.js";
|
|
13
|
+
import objectPropertyFromValue from '../../utils/objectPropertyFromValue.js';
|
|
14
|
+
|
|
15
|
+
export default class extends Generator {
|
|
16
|
+
async prompting() {
|
|
17
|
+
this.log(
|
|
18
|
+
lines([
|
|
19
|
+
title(`Let's generate a ${highlightText("WordPress client plugin")}!`),
|
|
20
|
+
infoBox(
|
|
21
|
+
lines([
|
|
22
|
+
"This will create the files for a WP plugin.",
|
|
23
|
+
"",
|
|
24
|
+
"Before starting you should have:",
|
|
25
|
+
" - Created a repository",
|
|
26
|
+
"",
|
|
27
|
+
"All the files will be created in the current",
|
|
28
|
+
"folder. Make sure to navigate to repo folder",
|
|
29
|
+
"first.",
|
|
30
|
+
])
|
|
31
|
+
),
|
|
32
|
+
"",
|
|
33
|
+
])
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
const prompts = [
|
|
37
|
+
{
|
|
38
|
+
type: "input",
|
|
39
|
+
name: "pluginName",
|
|
40
|
+
message: 'What is the name of the plugin? (e.g. "Airfleet Cyberproof")',
|
|
41
|
+
validate: requiredText("Please enter a name"),
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
type: "input",
|
|
45
|
+
name: "pluginDescription",
|
|
46
|
+
message: "How would you describe the plugin?",
|
|
47
|
+
validate: requiredText("Please enter a description"),
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
type: "input",
|
|
51
|
+
name: "pluginRepository",
|
|
52
|
+
message:
|
|
53
|
+
"What's the repository URL? (start with https and end with .git)",
|
|
54
|
+
validate: requiredText("Please enter the repository URL"),
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
type: "input",
|
|
58
|
+
name: "pluginPhpVersion",
|
|
59
|
+
message: "What's the required PHP version?",
|
|
60
|
+
validate: requiredText("Please enter the PHP version"),
|
|
61
|
+
default: ">=8.2",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
type: "input",
|
|
65
|
+
name: "pluginNodeVersion",
|
|
66
|
+
message: "What's the required Node version?",
|
|
67
|
+
validate: requiredText("Please enter the Node version"),
|
|
68
|
+
default: ">=16",
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: "confirm",
|
|
72
|
+
name: "pluginUseBlade",
|
|
73
|
+
message: "Use Blade?",
|
|
74
|
+
default: false,
|
|
75
|
+
},
|
|
76
|
+
];
|
|
77
|
+
|
|
78
|
+
this.answers = await this.prompt(prompts);
|
|
79
|
+
this.name = nameCases(this.answers.pluginName);
|
|
80
|
+
|
|
81
|
+
const nameNoAirfleet = this.answers.pluginName
|
|
82
|
+
.replace(/^airfleet/i, "")
|
|
83
|
+
.trim();
|
|
84
|
+
this.nameNoAirfleet = nameCases(nameNoAirfleet);
|
|
85
|
+
this.data = {
|
|
86
|
+
answers: this.answers,
|
|
87
|
+
name: this.name,
|
|
88
|
+
nameNoAirfleet: this.nameNoAirfleet,
|
|
89
|
+
repositoryBase: this.answers.pluginRepository.replace(/\.git$/, ""),
|
|
90
|
+
packageName: `@airfleet/${this.nameNoAirfleet.slug}-wp-plugin`,
|
|
91
|
+
mainBranch: "main",
|
|
92
|
+
year: new Date().getFullYear(),
|
|
93
|
+
phpVersion: this._getPhpVersion(this.answers.pluginPhpVersion),
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
writing() {
|
|
98
|
+
const templateExtension = this.answers.pluginUseBlade ? 'blade.php' : 'php';
|
|
99
|
+
|
|
100
|
+
const files = [
|
|
101
|
+
".github/workflows/create-asana-attachment.yaml",
|
|
102
|
+
".github/workflows/test-wordpress.yml",
|
|
103
|
+
".husky/pre-commit",
|
|
104
|
+
".vscode/settings.json",
|
|
105
|
+
"acf-json/.gitkeep",
|
|
106
|
+
"acf-json/field-groups/.gitkeep",
|
|
107
|
+
"acf-json/option-pages/.gitkeep",
|
|
108
|
+
"acf-json/option-pages/airfleet-site-settings.json",
|
|
109
|
+
"acf-json/post-types/.gitkeep",
|
|
110
|
+
"acf-json/taxonomies/.gitkeep",
|
|
111
|
+
"assets/admin/styles/admin.entry.scss",
|
|
112
|
+
"assets/editor/styles/editor.entry.scss",
|
|
113
|
+
"assets/frontend/fonts/.gitkeep",
|
|
114
|
+
"assets/frontend/images/.gitkeep",
|
|
115
|
+
"assets/frontend/scripts/index.entry.js",
|
|
116
|
+
"assets/frontend/styles/main/_body.scss",
|
|
117
|
+
"assets/frontend/styles/main/_reset.scss",
|
|
118
|
+
"assets/frontend/styles/placeholders/_button.scss",
|
|
119
|
+
"assets/frontend/styles/placeholders/_container.scss",
|
|
120
|
+
"assets/frontend/styles/placeholders/_sections.scss",
|
|
121
|
+
"assets/frontend/styles/root/_fonts.scss",
|
|
122
|
+
"assets/frontend/styles/_main.scss",
|
|
123
|
+
"assets/frontend/styles/_placeholders.scss",
|
|
124
|
+
"assets/frontend/styles/_root.scss",
|
|
125
|
+
"assets/frontend/styles/critical.entry.scss",
|
|
126
|
+
"assets/frontend/styles/index.entry.scss",
|
|
127
|
+
"assets/login/.gitkeep",
|
|
128
|
+
"assets/shared/styles/lib/mixins/_background.scss",
|
|
129
|
+
"assets/shared/styles/lib/mixins/_body.scss",
|
|
130
|
+
"assets/shared/styles/lib/mixins/_breakpoints.scss",
|
|
131
|
+
"assets/shared/styles/lib/mixins/_helpers.scss",
|
|
132
|
+
"assets/shared/styles/lib/mixins/_list-inline.scss",
|
|
133
|
+
"assets/shared/styles/lib/mixins/_position.scss",
|
|
134
|
+
"assets/shared/styles/lib/_mixins.scss",
|
|
135
|
+
"assets/shared/styles/lib/_scss-variables.scss",
|
|
136
|
+
"assets/shared/styles/_figma-variables.scss",
|
|
137
|
+
"assets/shared/styles/_lib.scss",
|
|
138
|
+
"assets/shared/styles/_root.scss",
|
|
139
|
+
"assets/shared/styles/_shared.scss",
|
|
140
|
+
"figma/design-tokens/.gitkeep",
|
|
141
|
+
"figma/design-tokens/manifest.json",
|
|
142
|
+
"inc/Features/Menus.php.ejs",
|
|
143
|
+
"inc/Setup/AjaxVariables.php.ejs",
|
|
144
|
+
"inc/Setup/AjaxVariablesAdmin.php.ejs",
|
|
145
|
+
"inc/Setup/Breakpoints.php.ejs",
|
|
146
|
+
"inc/Setup/Colors.php.ejs",
|
|
147
|
+
"inc/Setup/RegisterViews.php.ejs",
|
|
148
|
+
"inc/Setup.php.ejs",
|
|
149
|
+
"views/blocks/.gitkeep",
|
|
150
|
+
"views/components/.gitkeep",
|
|
151
|
+
"views/custom-templates/.gitkeep",
|
|
152
|
+
`views/partials/footer/footer.${templateExtension}.ejs`,
|
|
153
|
+
`views/partials/header/header.${templateExtension}.ejs`,
|
|
154
|
+
`views/partials/layout/layout.${templateExtension}.ejs`,
|
|
155
|
+
`views/templates/index/index.${templateExtension}.ejs`,
|
|
156
|
+
`views/templates/not-found/not-found.${templateExtension}.ejs`,
|
|
157
|
+
`views/templates/page/page.${templateExtension}.ejs`,
|
|
158
|
+
`views/templates/single/single.${templateExtension}.ejs`,
|
|
159
|
+
"views/parcelkeep.entry.scss",
|
|
160
|
+
"views-elements/partials/button/button.entry.scss",
|
|
161
|
+
"views-elements/partials/button/ButtonSetup.php.ejs",
|
|
162
|
+
"views-elements/.gitkeep",
|
|
163
|
+
".airfleet-release",
|
|
164
|
+
".editorconfig",
|
|
165
|
+
".env",
|
|
166
|
+
".gitattributes",
|
|
167
|
+
".parcelrc",
|
|
168
|
+
".prettierignore",
|
|
169
|
+
"CHANGELOG.md",
|
|
170
|
+
"composer.json.ejs",
|
|
171
|
+
"composer-scoped.json.ejs",
|
|
172
|
+
"index.php",
|
|
173
|
+
"LICENSE.ejs",
|
|
174
|
+
"package.json.ejs",
|
|
175
|
+
"phpcs.xml.ejs",
|
|
176
|
+
"README.md.ejs",
|
|
177
|
+
"scoper.custom.php.ejs",
|
|
178
|
+
];
|
|
179
|
+
const templates = [
|
|
180
|
+
...mapFilesToTemplates(files),
|
|
181
|
+
{
|
|
182
|
+
template: "gitignore",
|
|
183
|
+
destination: `.gitignore`,
|
|
184
|
+
isEnabled: true,
|
|
185
|
+
},
|
|
186
|
+
{
|
|
187
|
+
template: ".husky/gitignore",
|
|
188
|
+
destination: `.husky/.gitignore`,
|
|
189
|
+
isEnabled: true,
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
template: "plugin-name.php.ejs",
|
|
193
|
+
destination: `${this.name.slug}.php`,
|
|
194
|
+
isEnabled: true,
|
|
195
|
+
},
|
|
196
|
+
{
|
|
197
|
+
template: "acf-json/.gitkeep",
|
|
198
|
+
destination: `acf-json/.gitkeep`,
|
|
199
|
+
isEnabled: true,
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
template: ".vscode/airfleet.code-snippets.ejs",
|
|
203
|
+
destination: ".vscode/airfleet.code-snippets",
|
|
204
|
+
isEnabled: true,
|
|
205
|
+
},
|
|
206
|
+
];
|
|
207
|
+
|
|
208
|
+
copyTemplates(this, templates, this.data);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
install() {
|
|
212
|
+
this.spawnCommand("composer", ["install"]);
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
_getPhpVersion(pluginPhpVersion) {
|
|
216
|
+
const toFind = ['=','>'];
|
|
217
|
+
|
|
218
|
+
for (const char of toFind) {
|
|
219
|
+
const index = pluginPhpVersion.indexOf(char);
|
|
220
|
+
|
|
221
|
+
if (index >= 0) {
|
|
222
|
+
return pluginPhpVersion.substring(index + 1);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
return pluginPhpVersion;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
minor
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# editorconfig.org
|
|
2
|
+
|
|
3
|
+
root = true
|
|
4
|
+
|
|
5
|
+
[*]
|
|
6
|
+
charset = utf-8
|
|
7
|
+
end_of_line = lf
|
|
8
|
+
indent_style = space
|
|
9
|
+
indent_size = 2
|
|
10
|
+
trim_trailing_whitespace = true
|
|
11
|
+
insert_final_newline = true
|
|
12
|
+
|
|
13
|
+
[*.md]
|
|
14
|
+
trim_trailing_whitespace = false
|
|
15
|
+
|
|
16
|
+
[*.php]
|
|
17
|
+
indent_style = tab
|
|
18
|
+
indent_size = 4
|
|
File without changes
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
name: ✍️ Asana Create PR Attachment
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened, reopened]
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
create-asana-attachment-job:
|
|
9
|
+
runs-on: ubuntu-latest
|
|
10
|
+
timeout-minutes: 1
|
|
11
|
+
name: Create pull request attachments on Asana tasks
|
|
12
|
+
steps:
|
|
13
|
+
- name: Create pull request attachments
|
|
14
|
+
uses: Asana/create-app-attachment-github-action@latest
|
|
15
|
+
id: postAttachment
|
|
16
|
+
with:
|
|
17
|
+
asana-secret: ${{ secrets.ASANA_SECRET }}
|
|
18
|
+
- name: Log output status
|
|
19
|
+
run: echo "Status is ${{ steps.postAttachment.outputs.status }}"
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
name: 🧪 Test
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["staging", "development"]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: ["main", "staging", "development"]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- name: 🚚 Get latest code
|
|
16
|
+
uses: actions/checkout@v3
|
|
17
|
+
|
|
18
|
+
- name: ⚙️ Setup PHP
|
|
19
|
+
uses: shivammathur/setup-php@v2
|
|
20
|
+
with:
|
|
21
|
+
php-version: "8.2"
|
|
22
|
+
ini-values: short_open_tag=1
|
|
23
|
+
env:
|
|
24
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
25
|
+
|
|
26
|
+
- name: ⚙️ Setup Node
|
|
27
|
+
uses: actions/setup-node@v3
|
|
28
|
+
with:
|
|
29
|
+
node-version: 16
|
|
30
|
+
|
|
31
|
+
- name: 🔨 Increase composer timeout
|
|
32
|
+
run: composer --global config process-timeout 1500
|
|
33
|
+
|
|
34
|
+
- name: 🔨 Composer install
|
|
35
|
+
run: composer install --prefer-dist --no-ansi --no-interaction --no-progress --optimize-autoloader
|
|
36
|
+
|
|
37
|
+
- name: 🔨 npm install
|
|
38
|
+
run: npm ci
|
|
39
|
+
|
|
40
|
+
- name: 🔬 Test
|
|
41
|
+
run: npm test
|
|
42
|
+
|
|
43
|
+
- name: 📦 Build
|
|
44
|
+
run: npm run build --if-present
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
_
|