@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
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
@mixin tablet-up {
|
|
2
|
+
@media (width >= 768px) {
|
|
3
|
+
@content;
|
|
4
|
+
}
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@mixin laptop-up {
|
|
8
|
+
@media (width >= 1280px) {
|
|
9
|
+
@content;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
@mixin desktop-up {
|
|
14
|
+
@media (width >= 1920px) {
|
|
15
|
+
@content;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* Desktop First
|
|
22
|
+
*
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
@mixin desktop-down {
|
|
26
|
+
@media (width < 1920px) {
|
|
27
|
+
@content;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
@mixin laptop-down {
|
|
32
|
+
@media (width < 1280px) {
|
|
33
|
+
@content;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@mixin tablet-down {
|
|
38
|
+
@media (width < 768px) {
|
|
39
|
+
@content;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* Specific Resolution Breakpoints
|
|
46
|
+
*
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
@mixin tablet-only() {
|
|
50
|
+
@media (width >= 768px) and (width < 1280px) {
|
|
51
|
+
@content;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@mixin laptop-only() {
|
|
56
|
+
@media (width >= 1280px) and (width < 1920px) {
|
|
57
|
+
@content;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* WordPress Breakpoints
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
66
|
+
|
|
67
|
+
// mobile with admin bar
|
|
68
|
+
@mixin admin-bar-mobile {
|
|
69
|
+
@media (width < 600px) {
|
|
70
|
+
@content;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// tablet with admin bar
|
|
75
|
+
@mixin admin-bar-tablet {
|
|
76
|
+
@media (width < 782px) {
|
|
77
|
+
@content;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
// Center flex children
|
|
2
|
+
@mixin afu-flex-center {
|
|
3
|
+
align-items: center;
|
|
4
|
+
display: flex;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
// Center block element horizontally
|
|
9
|
+
@mixin afu-center-block($w) {
|
|
10
|
+
margin-inline: auto;
|
|
11
|
+
max-width: $w;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Create columns with even vertical spacing
|
|
15
|
+
@mixin afu-vertical-gap($gap: 20px) {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
gap: $gap;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
// Set an image element to object fit
|
|
22
|
+
@mixin afu-image-size($type: cover) {
|
|
23
|
+
height: 100%;
|
|
24
|
+
object-fit: $type;
|
|
25
|
+
width: 100%;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// Truncate text to specific lines
|
|
29
|
+
@mixin afu-truncate-text-lines($lines) {
|
|
30
|
+
-webkit-box-orient: vertical;
|
|
31
|
+
display: -webkit-box;
|
|
32
|
+
-webkit-line-clamp: $lines;
|
|
33
|
+
overflow: hidden;
|
|
34
|
+
text-overflow: ellipsis;
|
|
35
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@mixin list-inline($li-margin-right: 0.5rem) {
|
|
2
|
+
padding-left: 0;
|
|
3
|
+
list-style: none;
|
|
4
|
+
|
|
5
|
+
li {
|
|
6
|
+
display: inline-block;
|
|
7
|
+
|
|
8
|
+
&:not(:last-child) {
|
|
9
|
+
margin-right: $li-margin-right;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
// Set elements in row with gap
|
|
15
|
+
// Better use this than just list-inline
|
|
16
|
+
@mixin afu-list-inline-flex($gap) {
|
|
17
|
+
padding-left: 0;
|
|
18
|
+
list-style: none;
|
|
19
|
+
align-items: center;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-wrap: wrap;
|
|
22
|
+
gap: $gap;
|
|
23
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
@mixin position-fill($position: absolute) {
|
|
2
|
+
height: 100%;
|
|
3
|
+
left: 0;
|
|
4
|
+
position: $position;
|
|
5
|
+
top: 0;
|
|
6
|
+
width: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
// Position the element absolutely centered.
|
|
10
|
+
@mixin position-absolute-center() {
|
|
11
|
+
left: 50%;
|
|
12
|
+
position: absolute;
|
|
13
|
+
top: 50%;
|
|
14
|
+
transform: translateX(-50%) translateY(-50%);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Similar to Bootstrap's fixed top, but with optional position.
|
|
18
|
+
@mixin position-top($position, $zindex: 1030) {
|
|
19
|
+
left: 0;
|
|
20
|
+
position: $position;
|
|
21
|
+
right: 0;
|
|
22
|
+
top: 0;
|
|
23
|
+
z-index: $zindex;
|
|
24
|
+
}
|
|
@@ -0,0 +1,124 @@
|
|
|
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": "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
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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": "^3.2.0",
|
|
16
|
+
"wpify/scoper": "2.5.4"
|
|
17
|
+
},
|
|
18
|
+
"autoload": {
|
|
19
|
+
"psr-4": {
|
|
20
|
+
"Airfleet\\Plugins\\<%= nameNoAirfleet.pascal %>\\": "inc/"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"scripts": {
|
|
24
|
+
"lint": "phpcs",
|
|
25
|
+
"fix": "phpcbf",
|
|
26
|
+
"install-codestandards": [
|
|
27
|
+
"Dealerdirect\\Composer\\Plugin\\Installers\\PHPCodeSniffer\\Plugin::run"
|
|
28
|
+
],
|
|
29
|
+
"post-install-cmd": [
|
|
30
|
+
"@install-codestandards"
|
|
31
|
+
]
|
|
32
|
+
},
|
|
33
|
+
"config": {
|
|
34
|
+
"allow-plugins": {
|
|
35
|
+
"composer/installers": true,
|
|
36
|
+
"dealerdirect/phpcodesniffer-composer-installer": true,
|
|
37
|
+
"wpify/scoper": true
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"extra": {
|
|
41
|
+
"wpify-scoper": {
|
|
42
|
+
"prefix": "Airfleet\\Plugins\\<%= nameNoAirfleet.pascal %>\\Vendor",
|
|
43
|
+
"folder": "vendor-scoped",
|
|
44
|
+
"globals": [
|
|
45
|
+
"wordpress"
|
|
46
|
+
],
|
|
47
|
+
"composerjson": "composer-scoped.json",
|
|
48
|
+
"composerlock": "composer-scoped.lock"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"minimum-stability": "dev"
|
|
52
|
+
}
|
|
File without changes
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Features;
|
|
4
|
+
|
|
5
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Vendor\Airfleet\Framework\Features\Feature;
|
|
6
|
+
|
|
7
|
+
class Menus implements Feature {
|
|
8
|
+
public function initialize(): void {
|
|
9
|
+
add_action(
|
|
10
|
+
'after_setup_theme',
|
|
11
|
+
function () {
|
|
12
|
+
register_nav_menus(
|
|
13
|
+
[
|
|
14
|
+
'main-menu' => __( 'Main Menu', 'airfleet' ),
|
|
15
|
+
'footer-menu' => __( 'Footer Menu', 'airfleet' ),
|
|
16
|
+
'privacy-menu' => __( 'Privacy Menu', 'airfleet' ),
|
|
17
|
+
]
|
|
18
|
+
);
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup;
|
|
4
|
+
|
|
5
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Vendor\Airfleet\Framework\Assets\FrontendVariables;
|
|
6
|
+
|
|
7
|
+
class AjaxVariables extends FrontendVariables {
|
|
8
|
+
public function __construct() {
|
|
9
|
+
parent::__construct(
|
|
10
|
+
[
|
|
11
|
+
'slug' => \<%= name.constant %>_SLUG,
|
|
12
|
+
'name' => '_<%= name.camel %>',
|
|
13
|
+
'variables' => function (): array {
|
|
14
|
+
return [
|
|
15
|
+
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
|
|
16
|
+
'ajaxNonce' => wp_create_nonce( '<%= name.camel %>Nonce' ),
|
|
17
|
+
];
|
|
18
|
+
},
|
|
19
|
+
]
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup;
|
|
4
|
+
|
|
5
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Vendor\Airfleet\Framework\Assets\AdminVariables;
|
|
6
|
+
|
|
7
|
+
class AjaxVariablesAdmin extends AdminVariables {
|
|
8
|
+
public function __construct() {
|
|
9
|
+
parent::__construct(
|
|
10
|
+
[
|
|
11
|
+
'slug' => \<%= name.constant %>_SLUG,
|
|
12
|
+
'name' => '_<%= name.camel %>',
|
|
13
|
+
'variables' => function (): array {
|
|
14
|
+
return [
|
|
15
|
+
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
|
|
16
|
+
'ajaxNonce' => wp_create_nonce( '<%= name.camel %>Nonce' ),
|
|
17
|
+
];
|
|
18
|
+
},
|
|
19
|
+
]
|
|
20
|
+
);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup;
|
|
4
|
+
|
|
5
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Vendor\Airfleet\Framework\Features\Feature;
|
|
6
|
+
|
|
7
|
+
class Breakpoints implements Feature {
|
|
8
|
+
public function initialize(): void {
|
|
9
|
+
add_filter(
|
|
10
|
+
'airfleet/elements/breakpoints',
|
|
11
|
+
function ( $breakpoints ): array {
|
|
12
|
+
// ? Customize breakpoints. See https://www.notion.so/codersclan/Breakpoints-filter-40496c68b30543c3ae78bfcbe5193f4b
|
|
13
|
+
// ! If you update this, you should also update mixins/_breakpoints.scss
|
|
14
|
+
return $breakpoints;
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup;
|
|
4
|
+
|
|
5
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Vendor\Airfleet\Framework\Features\Feature;
|
|
6
|
+
|
|
7
|
+
class Colors implements Feature {
|
|
8
|
+
public function initialize(): void {
|
|
9
|
+
add_filter(
|
|
10
|
+
'airfleet/elements/colors',
|
|
11
|
+
function ( $colors ): array {
|
|
12
|
+
// ? Customize colors. See https://www.notion.so/codersclan/Colors-filter-5f5ed8f4b8f647fdb76bd8494fe5a217
|
|
13
|
+
return $colors;
|
|
14
|
+
}
|
|
15
|
+
);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup;
|
|
4
|
+
|
|
5
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Vendor\Airfleet\Framework\Features\BasePluginFeature;
|
|
6
|
+
|
|
7
|
+
class RegisterViews extends BasePluginFeature {
|
|
8
|
+
public function initialize(): void {
|
|
9
|
+
add_filter(
|
|
10
|
+
'airfleet/views/config',
|
|
11
|
+
function ( array $views ): array {
|
|
12
|
+
// Views
|
|
13
|
+
$views[] = [
|
|
14
|
+
'namespace' => 'Airfleet\\Plugins\\<%= nameNoAirfleet.pascal %>\\Views',
|
|
15
|
+
'path' => \<%= name.constant %>_PATH . DIRECTORY_SEPARATOR . 'views',
|
|
16
|
+
'version' => \<%= name.constant %>_VERSION,
|
|
17
|
+
'url' => \<%= name.constant %>_URL . '/views',
|
|
18
|
+
'source' => \<%= name.constant %>_SLUG,
|
|
19
|
+
'prefix' => '',
|
|
20
|
+
'priority' => 99,
|
|
21
|
+
'enqueue' => false,
|
|
22
|
+
];
|
|
23
|
+
|
|
24
|
+
// Register dist folder for compiled assets
|
|
25
|
+
$views[] = [
|
|
26
|
+
'namespace' => 'Airfleet\\Plugins\\<%= nameNoAirfleet.pascal %>\\Views',
|
|
27
|
+
'path' => \<%= name.constant %>_PATH . DIRECTORY_SEPARATOR . 'dist' . DIRECTORY_SEPARATOR . 'views',
|
|
28
|
+
'version' => \<%= name.constant %>_VERSION,
|
|
29
|
+
'url' => \<%= name.constant %>_URL . '/dist/views',
|
|
30
|
+
'source' => \<%= name.constant %>_SLUG,
|
|
31
|
+
'prefix' => '',
|
|
32
|
+
'priority' => 99,
|
|
33
|
+
'enqueue_only' => true,
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
// Views Elements
|
|
37
|
+
$views[] = [
|
|
38
|
+
'namespace' => 'Airfleet\\Plugins\\<%= nameNoAirfleet.pascal %>\\ViewsElements',
|
|
39
|
+
'path' => \<%= name.constant %>_PATH . DIRECTORY_SEPARATOR . 'views-elements',
|
|
40
|
+
'version' => \<%= name.constant %>_VERSION,
|
|
41
|
+
'url' => \<%= name.constant %>_URL . '/views-elements',
|
|
42
|
+
'source' => \<%= name.constant %>_SLUG,
|
|
43
|
+
'prefix' => 'elements',
|
|
44
|
+
'priority' => 99,
|
|
45
|
+
'enqueue' => false,
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
// Register dist folder for compiled assets
|
|
49
|
+
$views[] = [
|
|
50
|
+
'namespace' => 'Airfleet\\Plugins\\<%= nameNoAirfleet.pascal %>\\ViewsElements',
|
|
51
|
+
'path' => \<%= name.constant %>_PATH . DIRECTORY_SEPARATOR . 'dist' . DIRECTORY_SEPARATOR . 'views-elements',
|
|
52
|
+
'version' => \<%= name.constant %>_VERSION,
|
|
53
|
+
'url' => \<%= name.constant %>_URL . '/dist/views-elements',
|
|
54
|
+
'source' => \<%= name.constant %>_SLUG,
|
|
55
|
+
'prefix' => 'elements',
|
|
56
|
+
'priority' => 99,
|
|
57
|
+
'enqueue_only' => true,
|
|
58
|
+
];
|
|
59
|
+
|
|
60
|
+
return $views;
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace Airfleet\Plugins\<%= nameNoAirfleet.pascal %>;
|
|
4
|
+
|
|
5
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Features\Menus;
|
|
6
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup\AjaxVariables;
|
|
7
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup\AjaxVariablesAdmin;
|
|
8
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup\Breakpoints;
|
|
9
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup\Colors;
|
|
10
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Setup\RegisterViews;
|
|
11
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Vendor\Airfleet\Framework\Acf\LocalJsonCategorized;
|
|
12
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Vendor\Airfleet\Framework\Assets\Enqueue;
|
|
13
|
+
use Airfleet\Plugins\<%= nameNoAirfleet.pascal %>\Vendor\Airfleet\Framework\Features\Features;
|
|
14
|
+
|
|
15
|
+
class Setup extends Features {
|
|
16
|
+
public function __construct( array $config ) {
|
|
17
|
+
parent::__construct(
|
|
18
|
+
[
|
|
19
|
+
new LocalJsonCategorized( $config['path'] . 'acf-json' ),
|
|
20
|
+
new Enqueue( $config ),
|
|
21
|
+
new AjaxVariables(),
|
|
22
|
+
new AjaxVariablesAdmin(),
|
|
23
|
+
new RegisterViews(),
|
|
24
|
+
new Breakpoints(),
|
|
25
|
+
new Colors(),
|
|
26
|
+
new Menus(),
|
|
27
|
+
]
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<?php // Silence is golden
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "<%= packageName %>",
|
|
3
|
+
"description": "<%= answers.pluginDescription %>",
|
|
4
|
+
"version": "<%= answers.pluginVersion %>",
|
|
5
|
+
"scripts": {
|
|
6
|
+
"build:figma": "tokens-to-css --input=./figma/design-tokens --output=./assets/shared/styles/_figma-variables.scss",
|
|
7
|
+
"build:parcel": "dotenv -- parcel build --no-source-maps --log-level verbose \"./!(dist|node_modules)/**/*.entry.{js,css,scss}\"",
|
|
8
|
+
"build": "run-s build:*",
|
|
9
|
+
"start": "dotenv -- parcel serve --hmr-port 1236 --port 1234 --log-level verbose \"./!(dist|node_modules)/**/*.entry.{js,css,scss}\"",
|
|
10
|
+
"watch": "dotenv -- parcel watch --no-hmr --log-level verbose \"./!(dist|node_modules)/**/*.entry.{js,css,scss}\"",
|
|
11
|
+
"base:eslint": "eslint \"**/*.js\" --cache --ignore-path .gitignore",
|
|
12
|
+
"base:prettier": "prettier \"**/*.{css,scss}\"",
|
|
13
|
+
"base:stylelint": "stylelint \"**/*.{css,scss}\" --cache --ignore-path .gitignore --allow-empty-input",
|
|
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"
|
|
27
|
+
},
|
|
28
|
+
"private": true,
|
|
29
|
+
"keywords": [
|
|
30
|
+
"airfleet"
|
|
31
|
+
],
|
|
32
|
+
"homepage": "https://www.airfleet.co",
|
|
33
|
+
"author": {
|
|
34
|
+
"name": "Airfleet",
|
|
35
|
+
"email": "dev@airfleet.co",
|
|
36
|
+
"url": "https://www.airfleet.co/"
|
|
37
|
+
},
|
|
38
|
+
"repository": {
|
|
39
|
+
"type": "git",
|
|
40
|
+
"url": "<%= answers.pluginRepository %>"
|
|
41
|
+
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": "<%- answers.pluginNodeVersion %>"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@airfleet/wordpress-dev": "^3.2.0"
|
|
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
|
+
]
|
|
84
|
+
}
|
|
85
|
+
}
|