@airfleet/generator-init 0.38.0 → 0.39.1
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/index.js +122 -26
- package/generators/plugin/templates/.browserslistrc +2 -0
- package/generators/plugin/templates/.dprint.json +3 -0
- package/generators/plugin/templates/.github/workflows/release-plugin-preview.yml +197 -0
- package/generators/plugin/templates/.github/workflows/release-plugin.yml +24 -18
- package/generators/plugin/templates/.github/workflows/test-wordpress.yml +43 -10
- package/generators/plugin/templates/.husky/pre-commit +1 -4
- package/generators/plugin/templates/.lintstagedrc.json +12 -0
- package/generators/plugin/templates/.node-version.ejs +1 -0
- package/generators/plugin/templates/.oxlintrc.json +3 -0
- package/generators/plugin/templates/.parcelrc +1 -2
- package/generators/plugin/templates/.stylelintrc.json +4 -0
- package/generators/plugin/templates/.vscode/airfleet.code-snippets.ejs +5 -1
- package/generators/plugin/templates/.vscode/settings.json +18 -8
- package/generators/plugin/templates/README.md.ejs +0 -11
- package/generators/plugin/templates/composer-scoped-empty.json.ejs +6 -0
- package/generators/plugin/templates/composer-scoped-empty.lock.ejs +18 -0
- package/generators/{project-plugin/templates/composer-scoped.json.ejs → plugin/templates/composer-scoped-framework.json.ejs} +1 -1
- package/generators/{project-plugin/templates/composer-scoped.lock.ejs → plugin/templates/composer-scoped-framework.lock.ejs} +19 -20
- package/generators/{project-plugin/templates/composer.json.ejs → plugin/templates/composer-with-scoper.json.ejs} +5 -4
- package/generators/plugin/templates/composer-without-scoper.json.ejs +40 -0
- package/generators/plugin/templates/gitignore +1 -0
- package/generators/plugin/templates/globals.d.ts +1 -0
- package/generators/plugin/templates/inc/AjaxVariables.php.ejs +1 -1
- package/generators/plugin/templates/inc/AjaxVariablesAdmin.php.ejs +1 -1
- package/generators/plugin/templates/inc/Options/GeneralOptions.php.ejs +2 -2
- package/generators/plugin/templates/inc/Pages.php.ejs +3 -3
- package/generators/plugin/templates/inc/RegisterViews.php.ejs +1 -1
- package/generators/plugin/templates/inc/Setup.php.ejs +6 -6
- package/generators/plugin/templates/package.json.ejs +9 -53
- package/generators/plugin/templates/plugin-name-api.php +1 -0
- package/generators/{project-plugin/templates/plugin-name.php.ejs → plugin/templates/plugin-name-scoped-framework.php.ejs} +11 -1
- package/generators/plugin/templates/plugin-name-unscoped-framework.php.ejs +82 -0
- package/generators/project/index.js +17 -21
- package/generators/project/info.js +2 -2
- package/generators/project/prompts.js +10 -16
- package/generators/project/templates/.deployignore +8 -0
- package/generators/project/templates/.github/workflows/test-wordpress-root-lightyear.yml +46 -9
- package/generators/project/templates/.husky/pre-commit +1 -4
- package/generators/project/templates/.vscode/airfleet.code-snippets +2 -2
- package/generators/project/templates/.vscode/settings.json +18 -8
- package/generators/project/templates/README.md.ejs +0 -9
- package/generators/project-plugin/index.js +92 -14
- package/generators/project-plugin/templates/.browserslistrc +2 -0
- package/generators/project-plugin/templates/.deployignore +38 -8
- package/generators/project-plugin/templates/.dprint.json +3 -0
- package/generators/project-plugin/templates/.github/workflows/test-wordpress.yml +43 -12
- package/generators/project-plugin/templates/.husky/pre-commit +1 -4
- package/generators/project-plugin/templates/.lintstagedrc.json +12 -0
- package/generators/project-plugin/templates/.node-version.ejs +1 -0
- package/generators/project-plugin/templates/.oxlintrc.json +3 -0
- package/generators/project-plugin/templates/.parcelrc +1 -2
- package/generators/project-plugin/templates/.stylelintrc.json +4 -0
- package/generators/project-plugin/templates/.vscode/airfleet.code-snippets.ejs +5 -1
- package/generators/project-plugin/templates/.vscode/settings.json +18 -8
- package/generators/project-plugin/templates/README.md.ejs +0 -7
- package/generators/project-plugin/templates/assets/admin/styles/admin.entry.scss +2 -2
- package/generators/project-plugin/templates/assets/editor/styles/editor.entry.scss +8 -7
- package/generators/project-plugin/templates/assets/frontend/styles/_main.scss +7 -3
- package/generators/project-plugin/templates/assets/frontend/styles/_placeholders.scss +9 -3
- package/generators/project-plugin/templates/assets/frontend/styles/_root.scss +2 -2
- package/generators/project-plugin/templates/assets/frontend/styles/critical.entry.scss +1 -1
- package/generators/project-plugin/templates/assets/frontend/styles/index.entry.scss +7 -5
- package/generators/project-plugin/templates/assets/frontend/styles/main/_body.scss +6 -4
- package/generators/project-plugin/templates/assets/frontend/styles/main/_reset.scss +98 -96
- package/generators/project-plugin/templates/assets/frontend/styles/placeholders/_button.scss +42 -40
- package/generators/project-plugin/templates/assets/frontend/styles/placeholders/_container.scss +12 -10
- package/generators/project-plugin/templates/assets/frontend/styles/placeholders/_sections.scss +6 -4
- package/generators/project-plugin/templates/assets/frontend/styles/root/_fonts.scss +2 -2
- package/generators/project-plugin/templates/assets/shared/styles/_figma-variables.scss +2 -5
- package/generators/project-plugin/templates/assets/shared/styles/_lib.scss +2 -2
- package/generators/project-plugin/templates/assets/shared/styles/_root.scss +2 -2
- package/generators/project-plugin/templates/assets/shared/styles/lib/_mixins.scss +6 -6
- package/generators/project-plugin/templates/assets/shared/styles/lib/mixins/_breakpoints.scss +1 -0
- package/generators/project-plugin/templates/composer-scoped-empty.json.ejs +6 -0
- package/generators/project-plugin/templates/composer-scoped-empty.lock.ejs +18 -0
- package/generators/{plugin/templates/composer-scoped.json.ejs → project-plugin/templates/composer-scoped-framework.json.ejs} +1 -1
- package/generators/{plugin/templates/composer-scoped.lock.ejs → project-plugin/templates/composer-scoped-framework.lock.ejs} +19 -20
- package/generators/{plugin/templates/composer.json.ejs → project-plugin/templates/composer-with-scoper.json.ejs} +5 -4
- package/generators/project-plugin/templates/composer-without-scoper.json.ejs +40 -0
- package/generators/project-plugin/templates/gitignore +1 -0
- package/generators/project-plugin/templates/globals.d.ts +1 -0
- package/generators/project-plugin/templates/inc/Features/Menus.php.ejs +1 -1
- package/generators/project-plugin/templates/inc/Setup/AjaxVariables.php.ejs +1 -1
- package/generators/project-plugin/templates/inc/Setup/AjaxVariablesAdmin.php.ejs +1 -1
- package/generators/project-plugin/templates/inc/Setup/Breakpoints.php.ejs +1 -1
- package/generators/project-plugin/templates/inc/Setup/Colors.php.ejs +1 -1
- package/generators/project-plugin/templates/inc/Setup/RegisterViews.php.ejs +1 -1
- package/generators/project-plugin/templates/inc/Setup.php.ejs +3 -3
- package/generators/project-plugin/templates/package.json.ejs +9 -58
- package/generators/{plugin/templates/plugin-name.php.ejs → project-plugin/templates/plugin-name-scoped-framework.php.ejs} +6 -1
- package/generators/project-plugin/templates/plugin-name-unscoped-framework.php.ejs +79 -0
- package/generators/snippets/templates/airfleet.code-snippets.ejs +2 -2
- package/package.json +1 -1
- package/utils/configureBunPackageManager.js +13 -0
- package/generators/plugin/templates/.prettierignore +0 -15
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@
|
|
1
|
+
@use "../../../shared/styles/lib";
|
|
2
2
|
|
|
3
3
|
// Declare font-faces here.
|
|
4
4
|
// Use https://transfonter.org/ to convert fonts to other formats.
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// ! Instead of hard-coding the font path, use the variable below like this:
|
|
7
7
|
// url($font-src + 'FontName.woff')
|
|
8
8
|
|
|
9
|
-
$font-src:
|
|
9
|
+
$font-src: "../../../assets/frontend/fonts";
|
|
10
10
|
|
|
11
11
|
// ! EXAMPLE
|
|
12
12
|
// @font-face {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
@
|
|
2
|
-
@
|
|
3
|
-
@
|
|
4
|
-
@
|
|
5
|
-
@
|
|
6
|
-
@
|
|
1
|
+
@forward "mixins/body";
|
|
2
|
+
@forward "mixins/breakpoints";
|
|
3
|
+
@forward "mixins/list-inline";
|
|
4
|
+
@forward "mixins/position";
|
|
5
|
+
@forward "mixins/background";
|
|
6
|
+
@forward "mixins/helpers";
|
|
@@ -0,0 +1,18 @@
|
|
|
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": "8d070178755c320c69f93ee4800660ef",
|
|
8
|
+
"packages": [],
|
|
9
|
+
"packages-dev": [],
|
|
10
|
+
"aliases": [],
|
|
11
|
+
"minimum-stability": "stable",
|
|
12
|
+
"stability-flags": {},
|
|
13
|
+
"prefer-stable": false,
|
|
14
|
+
"prefer-lowest": false,
|
|
15
|
+
"platform": {},
|
|
16
|
+
"platform-dev": {},
|
|
17
|
+
"plugin-api-version": "2.9.0"
|
|
18
|
+
}
|
|
@@ -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": "4e99e5cbc4901186086cdeb9b82bac6f",
|
|
8
8
|
"packages": [
|
|
9
9
|
{
|
|
10
10
|
"name": "airfleet/wordpress-framework",
|
|
11
|
-
"version": "1.
|
|
11
|
+
"version": "1.19.1",
|
|
12
12
|
"source": {
|
|
13
13
|
"type": "git",
|
|
14
14
|
"url": "https://github.com/airfleet/airfleet-wordpress-framework-php.git",
|
|
15
|
-
"reference": "
|
|
15
|
+
"reference": "b21dbfd5a3e3696762bb9e9c3f13cb1d73bd14de"
|
|
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/b21dbfd5a3e3696762bb9e9c3f13cb1d73bd14de",
|
|
20
|
+
"reference": "b21dbfd5a3e3696762bb9e9c3f13cb1d73bd14de",
|
|
21
21
|
"shasum": ""
|
|
22
22
|
},
|
|
23
23
|
"require": {
|
|
@@ -40,22 +40,22 @@
|
|
|
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.19.1"
|
|
44
44
|
},
|
|
45
|
-
"time": "
|
|
45
|
+
"time": "2025-11-21T10:22:03+00:00"
|
|
46
46
|
},
|
|
47
47
|
{
|
|
48
48
|
"name": "jawira/case-converter",
|
|
49
|
-
"version": "v3.
|
|
49
|
+
"version": "v3.6.0",
|
|
50
50
|
"source": {
|
|
51
51
|
"type": "git",
|
|
52
52
|
"url": "https://github.com/jawira/case-converter.git",
|
|
53
|
-
"reference": "
|
|
53
|
+
"reference": "de9956122568743a83e0fc7e2eaa92c1b0de3f18"
|
|
54
54
|
},
|
|
55
55
|
"dist": {
|
|
56
56
|
"type": "zip",
|
|
57
|
-
"url": "https://api.github.com/repos/jawira/case-converter/zipball/
|
|
58
|
-
"reference": "
|
|
57
|
+
"url": "https://api.github.com/repos/jawira/case-converter/zipball/de9956122568743a83e0fc7e2eaa92c1b0de3f18",
|
|
58
|
+
"reference": "de9956122568743a83e0fc7e2eaa92c1b0de3f18",
|
|
59
59
|
"shasum": ""
|
|
60
60
|
},
|
|
61
61
|
"require": {
|
|
@@ -64,9 +64,8 @@
|
|
|
64
64
|
},
|
|
65
65
|
"require-dev": {
|
|
66
66
|
"behat/behat": "^3.0",
|
|
67
|
-
"phpstan/phpstan": "^
|
|
68
|
-
"phpunit/phpunit": "^9.0"
|
|
69
|
-
"vimeo/psalm": "^4.0"
|
|
67
|
+
"phpstan/phpstan": "^v2",
|
|
68
|
+
"phpunit/phpunit": "^9.0"
|
|
70
69
|
},
|
|
71
70
|
"suggest": {
|
|
72
71
|
"pds/skeleton": "PHP Package Development Standards",
|
|
@@ -107,18 +106,18 @@
|
|
|
107
106
|
],
|
|
108
107
|
"support": {
|
|
109
108
|
"issues": "https://github.com/jawira/case-converter/issues",
|
|
110
|
-
"source": "https://github.com/jawira/case-converter/tree/v3.
|
|
109
|
+
"source": "https://github.com/jawira/case-converter/tree/v3.6.0"
|
|
111
110
|
},
|
|
112
|
-
"time": "
|
|
111
|
+
"time": "2025-06-13T21:12:55+00:00"
|
|
113
112
|
}
|
|
114
113
|
],
|
|
115
114
|
"packages-dev": [],
|
|
116
115
|
"aliases": [],
|
|
117
116
|
"minimum-stability": "stable",
|
|
118
|
-
"stability-flags":
|
|
117
|
+
"stability-flags": {},
|
|
119
118
|
"prefer-stable": false,
|
|
120
119
|
"prefer-lowest": false,
|
|
121
|
-
"platform":
|
|
122
|
-
"platform-dev":
|
|
123
|
-
"plugin-api-version": "2.
|
|
120
|
+
"platform": {},
|
|
121
|
+
"platform-dev": {},
|
|
122
|
+
"plugin-api-version": "2.9.0"
|
|
124
123
|
}
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"composer/installers": "^2.2.0"
|
|
13
13
|
},
|
|
14
14
|
"require-dev": {
|
|
15
|
-
"airfleet/wordpress-dev": "^
|
|
15
|
+
"airfleet/wordpress-dev": "^4.0.1",
|
|
16
16
|
"wpify/scoper": "2.5.4"
|
|
17
17
|
},
|
|
18
18
|
"autoload": {
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
}
|
|
22
22
|
},
|
|
23
23
|
"scripts": {
|
|
24
|
-
"lint": "
|
|
25
|
-
"fix": "
|
|
24
|
+
"lint": "bunx afwp lint --php",
|
|
25
|
+
"fix": "bunx afwp fix --php",
|
|
26
26
|
"install-codestandards": [
|
|
27
27
|
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
|
|
28
28
|
],
|
|
@@ -48,5 +48,6 @@
|
|
|
48
48
|
"composerlock": "composer-scoped.lock"
|
|
49
49
|
}
|
|
50
50
|
},
|
|
51
|
-
"minimum-stability": "dev"
|
|
51
|
+
"minimum-stability": "dev",
|
|
52
|
+
"prefer-stable": true
|
|
52
53
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "airfleet/<%= name.slug %>",
|
|
3
|
+
"type": "wordpress-plugin",
|
|
4
|
+
"authors": [
|
|
5
|
+
{
|
|
6
|
+
"name": "Airfleet",
|
|
7
|
+
"email": "dev@airfleet.co"
|
|
8
|
+
}
|
|
9
|
+
],
|
|
10
|
+
"require": {
|
|
11
|
+
"php": "<%- answers.pluginPhpVersion %>",
|
|
12
|
+
"composer/installers": "^2.2.0"
|
|
13
|
+
},
|
|
14
|
+
"require-dev": {
|
|
15
|
+
"airfleet/wordpress-dev": "^4.0.1"
|
|
16
|
+
},
|
|
17
|
+
"autoload": {
|
|
18
|
+
"psr-4": {
|
|
19
|
+
"Airfleet\\Plugins\\<%= nameNoAirfleet.pascal %>\\": "inc/"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"lint": "bunx afwp lint --php",
|
|
24
|
+
"fix": "bunx afwp fix --php",
|
|
25
|
+
"install-codestandards": [
|
|
26
|
+
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
|
|
27
|
+
],
|
|
28
|
+
"post-install-cmd": [
|
|
29
|
+
"@install-codestandards"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"config": {
|
|
33
|
+
"allow-plugins": {
|
|
34
|
+
"composer/installers": true,
|
|
35
|
+
"dealerdirect/phpcodesniffer-composer-installer": true
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"minimum-stability": "dev",
|
|
39
|
+
"prefer-stable": true
|
|
40
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/// <reference types="@airfleet/wordpress-types" />
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
namespace Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Features;
|
|
4
4
|
|
|
5
|
-
use
|
|
5
|
+
use <%= frameworkNamespace %>\Features\Feature;
|
|
6
6
|
|
|
7
7
|
class Menus implements Feature {
|
|
8
8
|
public function initialize(): void {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
namespace Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup;
|
|
4
4
|
|
|
5
|
-
use
|
|
5
|
+
use <%= frameworkNamespace %>\Assets\FrontendVariables;
|
|
6
6
|
|
|
7
7
|
class AjaxVariables extends FrontendVariables {
|
|
8
8
|
public function __construct() {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
namespace Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup;
|
|
4
4
|
|
|
5
|
-
use
|
|
5
|
+
use <%= frameworkNamespace %>\Assets\AdminVariables;
|
|
6
6
|
|
|
7
7
|
class AjaxVariablesAdmin extends AdminVariables {
|
|
8
8
|
public function __construct() {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
namespace Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup;
|
|
4
4
|
|
|
5
|
-
use
|
|
5
|
+
use <%= frameworkNamespace %>\Features\Feature;
|
|
6
6
|
|
|
7
7
|
class Breakpoints implements Feature {
|
|
8
8
|
public function initialize(): void {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
namespace Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup;
|
|
4
4
|
|
|
5
|
-
use
|
|
5
|
+
use <%= frameworkNamespace %>\Features\Feature;
|
|
6
6
|
|
|
7
7
|
class Colors implements Feature {
|
|
8
8
|
public function initialize(): void {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
namespace Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup;
|
|
4
4
|
|
|
5
|
-
use
|
|
5
|
+
use <%= frameworkNamespace %>\Features\BasePluginFeature;
|
|
6
6
|
|
|
7
7
|
class RegisterViews extends BasePluginFeature {
|
|
8
8
|
public function initialize(): void {
|
|
@@ -8,9 +8,9 @@ use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup\AjaxVariablesAdmin;
|
|
|
8
8
|
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup\Breakpoints;
|
|
9
9
|
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup\Colors;
|
|
10
10
|
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup\RegisterViews;
|
|
11
|
-
use
|
|
12
|
-
use
|
|
13
|
-
use
|
|
11
|
+
use <%= frameworkNamespace %>\Acf\LocalJsonCategorized;
|
|
12
|
+
use <%= frameworkNamespace %>\Assets\Enqueue;
|
|
13
|
+
use <%= frameworkNamespace %>\Features\Features;
|
|
14
14
|
|
|
15
15
|
class Setup extends Features {
|
|
16
16
|
public function __construct( array $config ) {
|
|
@@ -3,27 +3,14 @@
|
|
|
3
3
|
"description": "<%= answers.pluginDescription %>",
|
|
4
4
|
"version": "<%= answers.pluginVersion %>",
|
|
5
5
|
"scripts": {
|
|
6
|
-
"build
|
|
7
|
-
"
|
|
8
|
-
"
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"lint": "run-s --continue-on-error lint:*",
|
|
15
|
-
"lint:prettier": "npm run base:prettier -- --check",
|
|
16
|
-
"lint:eslint": "npm run base:eslint",
|
|
17
|
-
"lint:stylelint": "npm run base:stylelint",
|
|
18
|
-
"lint:phpcs": "composer run lint",
|
|
19
|
-
"fix": "run-s fix:*",
|
|
20
|
-
"fix:prettier": "npm run base:prettier -- --write",
|
|
21
|
-
"fix:eslint": "npm run base:eslint -- --fix",
|
|
22
|
-
"fix:stylelint": "npm run base:stylelint -- --fix",
|
|
23
|
-
"fix:phpcs": "composer run fix",
|
|
24
|
-
"pretest": "npm run lint",
|
|
25
|
-
"test": "echo Testing done",
|
|
26
|
-
"prepare": "husky install"
|
|
6
|
+
"build": "afwp build",
|
|
7
|
+
"start": "afwp serve",
|
|
8
|
+
"watch": "afwp watch",
|
|
9
|
+
"lint": "afwp lint",
|
|
10
|
+
"fix": "afwp fix",
|
|
11
|
+
"format": "afwp format",
|
|
12
|
+
"test": "afwp test",
|
|
13
|
+
"prepare": "afwp prepare"
|
|
27
14
|
},
|
|
28
15
|
"private": true,
|
|
29
16
|
"keywords": [
|
|
@@ -44,42 +31,6 @@
|
|
|
44
31
|
},
|
|
45
32
|
"dependencies": {},
|
|
46
33
|
"devDependencies": {
|
|
47
|
-
"@airfleet/wordpress-dev": "^3.
|
|
48
|
-
},
|
|
49
|
-
"browserslist": [
|
|
50
|
-
"defaults",
|
|
51
|
-
"not dead",
|
|
52
|
-
"not op_mini all",
|
|
53
|
-
"not op_mob > 0",
|
|
54
|
-
"not opera > 0",
|
|
55
|
-
"not kaios > 0",
|
|
56
|
-
"not and_qq > 0",
|
|
57
|
-
"not and_uc > 0"
|
|
58
|
-
],
|
|
59
|
-
"prettier": "@airfleet/prettier-config-wordpress",
|
|
60
|
-
"stylelint": {
|
|
61
|
-
"extends": [
|
|
62
|
-
"@airfleet/stylelint-config-wordpress"
|
|
63
|
-
],
|
|
64
|
-
"ignoreFiles": [
|
|
65
|
-
"**/_figma-variables.scss"
|
|
66
|
-
]
|
|
67
|
-
},
|
|
68
|
-
"eslintConfig": {
|
|
69
|
-
"extends": [
|
|
70
|
-
"@airfleet/eslint-config-wordpress",
|
|
71
|
-
"plugin:no-jquery/all"
|
|
72
|
-
]
|
|
73
|
-
},
|
|
74
|
-
"lint-staged": {
|
|
75
|
-
"*.{js,jsx}": "eslint --cache --ignore-path .gitignore --fix",
|
|
76
|
-
"*.{css,scss}": [
|
|
77
|
-
"prettier --write",
|
|
78
|
-
"stylelint --cache --ignore-path .gitignore --fix"
|
|
79
|
-
],
|
|
80
|
-
"*.php": [
|
|
81
|
-
"composer run fix",
|
|
82
|
-
"composer run lint"
|
|
83
|
-
]
|
|
34
|
+
"@airfleet/wordpress-dev": "^4.3.0"
|
|
84
35
|
}
|
|
85
36
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @wordpress-plugin
|
|
11
11
|
* Plugin Name: <%= name.title %>
|
|
12
|
-
* Plugin URI:
|
|
12
|
+
* Plugin URI: https://www.airfleet.co/
|
|
13
13
|
* Description: <%= answers.pluginDescription %>
|
|
14
14
|
* Version: <%= answers.pluginVersion %>
|
|
15
15
|
* Requires PHP: <%= phpVersion %>
|
|
@@ -19,6 +19,9 @@
|
|
|
19
19
|
* GitHub Plugin URI: <%= repositoryBase %>
|
|
20
20
|
* Primary Branch: <%= mainBranch %>
|
|
21
21
|
* Release Asset: true
|
|
22
|
+
<%_ if (answers.hasDependencies) { _%>
|
|
23
|
+
* Requires Plugins: <%= answers.dependencies %>
|
|
24
|
+
<% } _%>
|
|
22
25
|
*/
|
|
23
26
|
|
|
24
27
|
// Exit if accessed directly.
|
|
@@ -40,7 +43,9 @@ define( '<%= name.constant %>_IMAGES_OPTIONS_URL', <%= name.constant %>_URL . '/
|
|
|
40
43
|
|
|
41
44
|
// Autoload classes.
|
|
42
45
|
require_once __DIR__ . '/vendor/autoload.php';
|
|
46
|
+
<%_ if (answers.addScoper) { _%>
|
|
43
47
|
require_once __DIR__ . '/vendor-scoped/scoper-autoload.php';
|
|
48
|
+
<% } _%>
|
|
44
49
|
|
|
45
50
|
// Initialize plugin.
|
|
46
51
|
$<%= name.snake %> = new \Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup(
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
/**
|
|
3
|
+
* <%= name.title %>
|
|
4
|
+
*
|
|
5
|
+
* @package Airfleet\Plugins\<%= nameNoAirfleet.pascal %>
|
|
6
|
+
* @version <%= answers.pluginVersion %>
|
|
7
|
+
* @author Airfleet
|
|
8
|
+
* @link https://www.airfleet.co/
|
|
9
|
+
*
|
|
10
|
+
* @wordpress-plugin
|
|
11
|
+
* Plugin Name: <%= name.title %>
|
|
12
|
+
* Plugin URI: https://www.airfleet.co/
|
|
13
|
+
* Description: <%= answers.pluginDescription %>
|
|
14
|
+
* Version: <%= answers.pluginVersion %>
|
|
15
|
+
* Requires PHP: <%= phpVersion %>
|
|
16
|
+
* Author: Airfleet
|
|
17
|
+
* Author URI: https://www.airfleet.co/
|
|
18
|
+
* Text Domain: <%= name.slug %>
|
|
19
|
+
* GitHub Plugin URI: <%= repositoryBase %>
|
|
20
|
+
* Primary Branch: <%= mainBranch %>
|
|
21
|
+
* Release Asset: true
|
|
22
|
+
<%_ if (answers.hasDependencies) { _%>
|
|
23
|
+
* Requires Plugins: <%= answers.dependencies %>
|
|
24
|
+
<% } _%>
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
// Exit if accessed directly.
|
|
28
|
+
if ( ! defined( 'ABSPATH' ) ) {
|
|
29
|
+
die;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// Plugin constants.
|
|
33
|
+
define( '<%= name.constant %>_VERSION', '<%= answers.pluginVersion %>' );
|
|
34
|
+
define( '<%= name.constant %>_SLUG', '<%= name.slug %>' );
|
|
35
|
+
define( '<%= name.constant %>_SLUG_SHORT', '<%= nameNoAirfleet.slug %>' );
|
|
36
|
+
define( '<%= name.constant %>_TITLE', '<%= name.title %>' );
|
|
37
|
+
define( '<%= name.constant %>_TITLE_SHORT', '<%= nameNoAirfleet.title %>' );
|
|
38
|
+
define( '<%= name.constant %>_PATH', plugin_dir_path( __FILE__ ) );
|
|
39
|
+
define( '<%= name.constant %>_URL', plugin_dir_url( __FILE__ ) );
|
|
40
|
+
define( '<%= name.constant %>_FILE', __FILE__ );
|
|
41
|
+
define( '<%= name.constant %>_DIR', __DIR__ );
|
|
42
|
+
define( '<%= name.constant %>_IMAGES_OPTIONS_URL', <%= name.constant %>_URL . '/assets/admin/images/options' );
|
|
43
|
+
|
|
44
|
+
// Autoload classes.
|
|
45
|
+
require_once __DIR__ . '/vendor/autoload.php';
|
|
46
|
+
<%_ if (answers.addScoper) { _%>
|
|
47
|
+
require_once __DIR__ . '/vendor-scoped/scoper-autoload.php';
|
|
48
|
+
<% } _%>
|
|
49
|
+
|
|
50
|
+
// Initialize plugin.
|
|
51
|
+
function <%= name.snake %>_uninstall() {
|
|
52
|
+
if ( ! class_exists( 'Airfleet\Framework\Features\PluginFeatures' ) ) {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
\Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup::uninstall();
|
|
56
|
+
}
|
|
57
|
+
$framework_enabled = fn () => class_exists( 'Airfleet\Framework\Features\PluginFeatures' );
|
|
58
|
+
$get_setup = fn () => new \Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup(
|
|
59
|
+
[
|
|
60
|
+
'slug' => \<%= name.constant %>_SLUG,
|
|
61
|
+
'short_slug' => \<%= name.constant %>_SLUG_SHORT,
|
|
62
|
+
'title' => \<%= name.constant %>_TITLE,
|
|
63
|
+
'short_title' => \<%= name.constant %>_TITLE_SHORT,
|
|
64
|
+
'url' => \<%= name.constant %>_URL,
|
|
65
|
+
'path' => \<%= name.constant %>_PATH,
|
|
66
|
+
'version' => \<%= name.constant %>_VERSION,
|
|
67
|
+
]
|
|
68
|
+
);
|
|
69
|
+
register_activation_hook( __FILE__, fn () => $framework_enabled() ? $get_setup()->on_activation() : null );
|
|
70
|
+
register_deactivation_hook( __FILE__, fn () => $framework_enabled() ? $get_setup()->on_deactivation() : null );
|
|
71
|
+
register_uninstall_hook( __FILE__, '<%= name.snake %>_uninstall' );
|
|
72
|
+
add_action( 'airfleet/framework/loaded', fn () => $get_setup()->initialize() );
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
76
|
+
* ! Do not make changes to this file.
|
|
77
|
+
* ! Edit the plugin class in folder inc/.
|
|
78
|
+
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
79
|
+
*/
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"",
|
|
8
8
|
"namespace Airfleet\\Plugins\\<%= nameNoAirfleet.pascal %>\\\\${TM_DIRECTORY/^.+[\\/\\\\]+(.*)$/$1/};",
|
|
9
9
|
"",
|
|
10
|
-
"use Airfleet\\
|
|
10
|
+
"use Airfleet\\Framework\\Features\\BasePluginFeature;",
|
|
11
11
|
"",
|
|
12
12
|
"class $TM_FILENAME_BASE extends BasePluginFeature {",
|
|
13
13
|
" public function initialize(): void {",
|
|
@@ -181,4 +181,4 @@
|
|
|
181
181
|
],
|
|
182
182
|
"description": "Bootstrap a Blade template for a partial"
|
|
183
183
|
}
|
|
184
|
-
}
|
|
184
|
+
}
|
package/package.json
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export default function configureBunPackageManager(generator) {
|
|
2
|
+
if (!generator) {
|
|
3
|
+
return;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
// Hint for any code that looks at the Yeoman env options.
|
|
7
|
+
if (generator.env?.options) {
|
|
8
|
+
// Tell Yeoman to use Bun as the package manager.
|
|
9
|
+
// Since Yeoman does not support Bun, it will not run anything, so we still have to call bun install directly.
|
|
10
|
+
generator.env.options.nodePackageManager = "bun";
|
|
11
|
+
generator.env.options.packageManager = "bun";
|
|
12
|
+
}
|
|
13
|
+
}
|