@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.
Files changed (95) hide show
  1. package/generators/plugin/templates/composer-scoped.json.ejs +1 -1
  2. package/generators/plugin/templates/composer-scoped.lock.ejs +122 -122
  3. package/generators/plugin/templates/gitignore +1 -0
  4. package/generators/plugin/templates/package.json.ejs +1 -1
  5. package/generators/project-plugin/index.js +229 -0
  6. package/generators/project-plugin/templates/.airfleet-release +1 -0
  7. package/generators/project-plugin/templates/.editorconfig +18 -0
  8. package/generators/project-plugin/templates/.env +0 -0
  9. package/generators/project-plugin/templates/.gitattributes +12 -0
  10. package/generators/project-plugin/templates/.github/workflows/create-asana-attachment.yaml +19 -0
  11. package/generators/project-plugin/templates/.github/workflows/test-wordpress.yml +44 -0
  12. package/generators/project-plugin/templates/.husky/gitignore +1 -0
  13. package/generators/project-plugin/templates/.husky/pre-commit +4 -0
  14. package/generators/project-plugin/templates/.parcelrc +4 -0
  15. package/generators/project-plugin/templates/.prettierignore +15 -0
  16. package/generators/project-plugin/templates/.vscode/airfleet.code-snippets.ejs +186 -0
  17. package/generators/project-plugin/templates/.vscode/settings.json +33 -0
  18. package/generators/project-plugin/templates/CHANGELOG.md +10 -0
  19. package/generators/project-plugin/templates/LICENSE.ejs +2 -0
  20. package/generators/project-plugin/templates/README.md.ejs +16 -0
  21. package/generators/project-plugin/templates/acf-json/.gitkeep +0 -0
  22. package/generators/project-plugin/templates/acf-json/field-groups/.gitkeep +0 -0
  23. package/generators/project-plugin/templates/acf-json/option-pages/.gitkeep +0 -0
  24. package/generators/project-plugin/templates/acf-json/option-pages/airfleet-site-settings.json +22 -0
  25. package/generators/project-plugin/templates/acf-json/post-types/.gitkeep +0 -0
  26. package/generators/project-plugin/templates/acf-json/taxonomies/.gitkeep +0 -0
  27. package/generators/project-plugin/templates/assets/admin/styles/admin.entry.scss +2 -0
  28. package/generators/project-plugin/templates/assets/editor/styles/editor.entry.scss +23 -0
  29. package/generators/project-plugin/templates/assets/frontend/fonts/.gitkeep +0 -0
  30. package/generators/project-plugin/templates/assets/frontend/images/.gitkeep +0 -0
  31. package/generators/project-plugin/templates/assets/frontend/scripts/index.entry.js +3 -0
  32. package/generators/project-plugin/templates/assets/frontend/styles/_main.scss +3 -0
  33. package/generators/project-plugin/templates/assets/frontend/styles/_placeholders.scss +3 -0
  34. package/generators/project-plugin/templates/assets/frontend/styles/_root.scss +4 -0
  35. package/generators/project-plugin/templates/assets/frontend/styles/critical.entry.scss +1 -0
  36. package/generators/project-plugin/templates/assets/frontend/styles/index.entry.scss +6 -0
  37. package/generators/project-plugin/templates/assets/frontend/styles/main/_body.scss +6 -0
  38. package/generators/project-plugin/templates/assets/frontend/styles/main/_reset.scss +121 -0
  39. package/generators/project-plugin/templates/assets/frontend/styles/placeholders/_button.scss +43 -0
  40. package/generators/project-plugin/templates/assets/frontend/styles/placeholders/_container.scss +12 -0
  41. package/generators/project-plugin/templates/assets/frontend/styles/placeholders/_sections.scss +6 -0
  42. package/generators/project-plugin/templates/assets/frontend/styles/root/_fonts.scss +21 -0
  43. package/generators/project-plugin/templates/assets/login/.gitkeep +0 -0
  44. package/generators/project-plugin/templates/assets/shared/styles/_figma-variables.scss +7 -0
  45. package/generators/project-plugin/templates/assets/shared/styles/_lib.scss +4 -0
  46. package/generators/project-plugin/templates/assets/shared/styles/_root.scss +6 -0
  47. package/generators/project-plugin/templates/assets/shared/styles/_shared.scss +1 -0
  48. package/generators/project-plugin/templates/assets/shared/styles/lib/_mixins.scss +6 -0
  49. package/generators/project-plugin/templates/assets/shared/styles/lib/_scss-variables.scss +2 -0
  50. package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_background.scss +11 -0
  51. package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_body.scss +4 -0
  52. package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_breakpoints.scss +79 -0
  53. package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_helpers.scss +35 -0
  54. package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_list-inline.scss +23 -0
  55. package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_position.scss +24 -0
  56. package/generators/project-plugin/templates/composer-scoped.json.ejs +8 -0
  57. package/generators/project-plugin/templates/composer-scoped.lock.ejs +124 -0
  58. package/generators/project-plugin/templates/composer.json.ejs +52 -0
  59. package/generators/project-plugin/templates/figma/design-tokens/.gitkeep +0 -0
  60. package/generators/project-plugin/templates/figma/design-tokens/manifest.json +5 -0
  61. package/generators/project-plugin/templates/gitignore +15 -0
  62. package/generators/project-plugin/templates/inc/Features/Menus.php.ejs +22 -0
  63. package/generators/project-plugin/templates/inc/Setup/AjaxVariables.php.ejs +22 -0
  64. package/generators/project-plugin/templates/inc/Setup/AjaxVariablesAdmin.php.ejs +22 -0
  65. package/generators/project-plugin/templates/inc/Setup/Breakpoints.php.ejs +18 -0
  66. package/generators/project-plugin/templates/inc/Setup/Colors.php.ejs +17 -0
  67. package/generators/project-plugin/templates/inc/Setup/RegisterViews.php.ejs +64 -0
  68. package/generators/project-plugin/templates/inc/Setup.php.ejs +30 -0
  69. package/generators/project-plugin/templates/index.php +1 -0
  70. package/generators/project-plugin/templates/package.json.ejs +85 -0
  71. package/generators/project-plugin/templates/phpcs.xml.ejs +23 -0
  72. package/generators/project-plugin/templates/plugin-name.php.ejs +65 -0
  73. package/generators/project-plugin/templates/scoper.custom.php.ejs +8 -0
  74. package/generators/project-plugin/templates/views/blocks/.gitkeep +0 -0
  75. package/generators/project-plugin/templates/views/components/.gitkeep +0 -0
  76. package/generators/project-plugin/templates/views/custom-templates/.gitkeep +0 -0
  77. package/generators/project-plugin/templates/views/parcelkeep.entry.scss +0 -0
  78. package/generators/project-plugin/templates/views/partials/footer/footer.blade.php.ejs +4 -0
  79. package/generators/project-plugin/templates/views/partials/footer/footer.php.ejs +4 -0
  80. package/generators/project-plugin/templates/views/partials/header/header.blade.php.ejs +12 -0
  81. package/generators/project-plugin/templates/views/partials/header/header.php.ejs +12 -0
  82. package/generators/project-plugin/templates/views/partials/layout/layout.blade.php.ejs +3 -0
  83. package/generators/project-plugin/templates/views/partials/layout/layout.php.ejs +5 -0
  84. package/generators/project-plugin/templates/views/templates/index/index.blade.php.ejs +30 -0
  85. package/generators/project-plugin/templates/views/templates/index/index.php.ejs +32 -0
  86. package/generators/project-plugin/templates/views/templates/not-found/not-found.blade.php.ejs +3 -0
  87. package/generators/project-plugin/templates/views/templates/not-found/not-found.php.ejs +5 -0
  88. package/generators/project-plugin/templates/views/templates/page/page.blade.php.ejs +10 -0
  89. package/generators/project-plugin/templates/views/templates/page/page.php.ejs +12 -0
  90. package/generators/project-plugin/templates/views/templates/single/single.blade.php.ejs +28 -0
  91. package/generators/project-plugin/templates/views/templates/single/single.php.ejs +30 -0
  92. package/generators/project-plugin/templates/views-elements/.gitkeep +0 -0
  93. package/generators/project-plugin/templates/views-elements/partials/button/ButtonSetup.php.ejs +32 -0
  94. package/generators/project-plugin/templates/views-elements/partials/button/button.entry.scss +13 -0
  95. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "require": {
3
- "airfleet/wordpress-framework": "^1.3.0"
3
+ "airfleet/wordpress-framework": "^1.5.0"
4
4
  },
5
5
  "config": {
6
6
  "autoloader-suffix": "<%= name.pascal %>"
@@ -1,124 +1,124 @@
1
1
  {
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": "0bc133803c8119982f80c3cdd959905e",
8
- "packages": [
9
- {
10
- "name": "airfleet/wordpress-framework",
11
- "version": "1.3.0",
12
- "source": {
13
- "type": "git",
14
- "url": "https://github.com/airfleet/airfleet-wordpress-framework-php.git",
15
- "reference": "4b50080dea677541b5df35dc17812b8cc93f5f9c"
16
- },
17
- "dist": {
18
- "type": "zip",
19
- "url": "https://api.github.com/repos/airfleet/airfleet-wordpress-framework-php/zipball/4b50080dea677541b5df35dc17812b8cc93f5f9c",
20
- "reference": "4b50080dea677541b5df35dc17812b8cc93f5f9c",
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.3.0"
44
- },
45
- "time": "2024-04-18T11:18:51+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"
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
  }
@@ -12,3 +12,4 @@ dist
12
12
  vendor-scoped
13
13
  wp-content
14
14
  .DS_Store
15
+ .idea
@@ -42,7 +42,7 @@
42
42
  },
43
43
  "dependencies": {},
44
44
  "devDependencies": {
45
- "@airfleet/wordpress-dev": "^3.1.0"
45
+ "@airfleet/wordpress-dev": "^3.2.0"
46
46
  },
47
47
  "browserslist": [
48
48
  "defaults",
@@ -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,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,12 @@
1
+ *.js eol=lf
2
+ *.jsx eol=lf
3
+ *.ts eol=lf
4
+ *.tsx eol=lf
5
+ *.json eol=lf
6
+ *.md eol=lf
7
+ *.yml eol=lf
8
+ *.yaml eol=lf
9
+ *.css eol=lf
10
+ *.scss eol=lf
11
+ *.php eol=lf
12
+ *.xml eol=lf
@@ -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,4 @@
1
+ #!/bin/sh
2
+ . "$(dirname "$0")/_/husky.sh"
3
+
4
+ npx lint-staged
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "@parcel/config-default",
3
+ "reporters": ["...", "parcel-reporter-bundle-manifest"]
4
+ }
@@ -0,0 +1,15 @@
1
+ node_modules
2
+ coverage
3
+ .npmrc
4
+ vendor
5
+ dist
6
+ .parcel-cache
7
+ .eslintcache
8
+ .stylelintcache
9
+ .phpcscache
10
+ .composer-cache
11
+ acf-json
12
+ CHANGELOG.md
13
+ .github
14
+ vendor-scoped
15
+ wp-content