@webikon/webentor-codemods 0.1.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/CHANGELOG.md +24 -0
- package/LICENCE.md +7 -0
- package/README.md +85 -0
- package/bin/webentor-codemods.mjs +215 -0
- package/migrations/0.13.0/README.md +99 -0
- package/migrations/0.13.0/rules/deps.yml +311 -0
- package/migrations/0.13.0/rules/editor-enqueue-iframe.yml +62 -0
- package/migrations/__fixtures__/0.13.0/after/app/setup.php +226 -0
- package/migrations/__fixtures__/0.13.0/after/composer.json +63 -0
- package/migrations/__fixtures__/0.13.0/after/package.json +86 -0
- package/migrations/__fixtures__/0.13.0/before/app/setup.php +211 -0
- package/migrations/__fixtures__/0.13.0/before/composer.json +63 -0
- package/migrations/__fixtures__/0.13.0/before/package.json +86 -0
- package/migrations/__fixtures__/0.13.0/customized/app/setup.php +24 -0
- package/migrations/__fixtures__/0.13.0/customized/composer.json +63 -0
- package/migrations/__fixtures__/0.13.0/customized/package.json +86 -0
- package/migrations/index.json +17 -0
- package/package.json +52 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webikon/webentor-theme",
|
|
3
|
+
"version": "2.0.6",
|
|
4
|
+
"private": true,
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=20.0.0"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "vite --configLoader runner",
|
|
11
|
+
"build": "vite build --configLoader runner",
|
|
12
|
+
"lint": "npm run lint:js && npm run lint:css",
|
|
13
|
+
"lint:js": "eslint resources/scripts resources/blocks",
|
|
14
|
+
"lint:css": "stylelint \"resources/**/*.{vue,css,sass,scss,less}\"",
|
|
15
|
+
"translate": "pnpm build && pnpm translate:pot && pnpm translate:update",
|
|
16
|
+
"translate:pot": "wp i18n make-pot . ./resources/languages/webentor.pot --include=\"parts,templates,app,resources\" --skip-block-json",
|
|
17
|
+
"translate:update": "wp i18n update-po ./resources/languages/webentor.pot ./resources/languages",
|
|
18
|
+
"translate:compile": "pnpm translate:mo && pnpm translate:js",
|
|
19
|
+
"translate:js": "wp i18n make-json ./resources/languages --pretty-print",
|
|
20
|
+
"translate:mo": "wp i18n make-mo ./resources/languages ./resources/languages",
|
|
21
|
+
"prettier-check": "prettier --check 'resources/**/*.{js,ts,tsx,css}'",
|
|
22
|
+
"prettier-check:js": "prettier --check 'resources/**/*.{js,ts,tsx}'",
|
|
23
|
+
"prettier-check:css": "prettier --check 'resources/**/*.css'",
|
|
24
|
+
"prettier-check:blade": "prettier --check 'resources/**/*.blade.php'",
|
|
25
|
+
"prettier-fix": "prettier --write 'resources/**/*.{js,ts,tsx,css}'",
|
|
26
|
+
"prettier-fix:js": "prettier --write 'resources/**/*.{js,ts,tsx}'",
|
|
27
|
+
"prettier-fix:css": "prettier --write 'resources/**/*.css'",
|
|
28
|
+
"prettier-fix:blade": "prettier --write 'resources/**/*.blade.php'",
|
|
29
|
+
"postinstall": "cd ../../../../ && husky",
|
|
30
|
+
"webentor:update": "pnpm up @webikon/webentor-core && composer update webikon/webentor-core"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@10up/block-components": "^1.22.2",
|
|
34
|
+
"@eslint/js": "^9.39.2",
|
|
35
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.7.1",
|
|
36
|
+
"@kucrut/vite-for-wp": "^0.12.0",
|
|
37
|
+
"@roots/vite-plugin": "^1.3.1",
|
|
38
|
+
"@shufo/prettier-plugin-blade": "^1.16.2",
|
|
39
|
+
"@tailwindcss/postcss": "^4.3.1",
|
|
40
|
+
"@tailwindcss/vite": "^4.3.1",
|
|
41
|
+
"@types/wordpress__block-editor": "^15.0.6",
|
|
42
|
+
"@vitejs/plugin-react": "^5.2.0",
|
|
43
|
+
"@webikon/webentor-core": "^0.13.0",
|
|
44
|
+
"@webikon/webentor-configs": "^1.0.2",
|
|
45
|
+
"@wordpress/block-editor": "^15.21.1",
|
|
46
|
+
"@wordpress/block-library": "^9.48.1",
|
|
47
|
+
"@wordpress/blocks": "^15.21.1",
|
|
48
|
+
"@wordpress/components": "^35.0.1",
|
|
49
|
+
"@wordpress/dependency-extraction-webpack-plugin": "^6.48.1",
|
|
50
|
+
"@wordpress/i18n": "^6.21.1",
|
|
51
|
+
"@wordpress/icons": "^14.0.1",
|
|
52
|
+
"eslint": "^9.39.2",
|
|
53
|
+
"eslint-config-prettier": "^10.1.8",
|
|
54
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
55
|
+
"eslint-plugin-react": "^7.37.5",
|
|
56
|
+
"husky": "^9.1.7",
|
|
57
|
+
"laravel-vite-plugin": "^2.0.1",
|
|
58
|
+
"lint-staged": "^16.4.0",
|
|
59
|
+
"patch-package": "^8.0.1",
|
|
60
|
+
"postcss": "^8.5.15",
|
|
61
|
+
"postcss-pxtorem": "^6.1.0",
|
|
62
|
+
"prettier": "^3.8.4",
|
|
63
|
+
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
64
|
+
"react": "^18.3.1",
|
|
65
|
+
"react-dom": "^18.3.1",
|
|
66
|
+
"rollup-plugin-external-globals": "^0.13.0",
|
|
67
|
+
"stylelint": "^17.13.0",
|
|
68
|
+
"stylelint-config-recommended": "^18.0.0",
|
|
69
|
+
"tailwindcss": "^4.3.1",
|
|
70
|
+
"typescript": "^5.9.3",
|
|
71
|
+
"typescript-eslint": "^8.61.1",
|
|
72
|
+
"vite": "^7.3.5",
|
|
73
|
+
"vite-plugin-external": "^6.2.2"
|
|
74
|
+
},
|
|
75
|
+
"lint-staged": {
|
|
76
|
+
"*.{js,ts,tsx}": "pnpm lint:js",
|
|
77
|
+
"*.css": "pnpm lint:css"
|
|
78
|
+
},
|
|
79
|
+
"dependencies": {
|
|
80
|
+
"@alpinejs/intersect": "^3.15.12",
|
|
81
|
+
"@imacrayon/alpine-ajax": "^0.12.6",
|
|
82
|
+
"alpinejs-masonry": "^1.0.16",
|
|
83
|
+
"lightgallery": "2.9.0"
|
|
84
|
+
},
|
|
85
|
+
"packageManager": "pnpm@10.15.1+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67"
|
|
86
|
+
}
|
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Support\Facades\File;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Register the theme assets.
|
|
9
|
+
*
|
|
10
|
+
* @return void
|
|
11
|
+
*/
|
|
12
|
+
add_action('enqueue_block_editor_assets', function (): void {
|
|
13
|
+
$dependencies = File::exists(get_template_directory() . '/public/build/editor.deps.json') ? File::json(get_template_directory() . '/public/build/editor.deps.json') : [];
|
|
14
|
+
|
|
15
|
+
\Kucrut\Vite\enqueue_asset(
|
|
16
|
+
get_template_directory() . '/public/build',
|
|
17
|
+
'resources/scripts/editor.ts',
|
|
18
|
+
[
|
|
19
|
+
'handle' => 'theme-blocks-editor',
|
|
20
|
+
'dependencies' => $dependencies,
|
|
21
|
+
'in-footer' => true, // Optional. Defaults to false.
|
|
22
|
+
]
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
\Kucrut\Vite\enqueue_asset(
|
|
26
|
+
get_template_directory() . '/public/build',
|
|
27
|
+
'resources/styles/editor.css',
|
|
28
|
+
[
|
|
29
|
+
'handle' => 'theme-blocks-editor-styles',
|
|
30
|
+
'css-only' => true,
|
|
31
|
+
]
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
\Kucrut\Vite\enqueue_asset(
|
|
35
|
+
get_template_directory() . '/public/build',
|
|
36
|
+
'resources/core-components/button/button.style.css',
|
|
37
|
+
[
|
|
38
|
+
'handle' => 'theme-button-styles',
|
|
39
|
+
'css-only' => true,
|
|
40
|
+
]
|
|
41
|
+
);
|
|
42
|
+
}, 10);
|
|
43
|
+
|
|
44
|
+
add_action('wp_enqueue_scripts', function () {
|
|
45
|
+
\Kucrut\Vite\enqueue_asset(
|
|
46
|
+
get_template_directory() . '/public/build',
|
|
47
|
+
'resources/scripts/app.ts',
|
|
48
|
+
[
|
|
49
|
+
'handle' => 'theme-app-scripts',
|
|
50
|
+
'in-footer' => true
|
|
51
|
+
]
|
|
52
|
+
);
|
|
53
|
+
|
|
54
|
+
\Kucrut\Vite\enqueue_asset(
|
|
55
|
+
get_template_directory() . '/public/build',
|
|
56
|
+
'resources/styles/app.css',
|
|
57
|
+
[
|
|
58
|
+
'handle' => 'theme-app-styles',
|
|
59
|
+
'css-only' => true,
|
|
60
|
+
]
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
\Kucrut\Vite\enqueue_asset(
|
|
64
|
+
get_template_directory() . '/public/build',
|
|
65
|
+
'resources/styles/lightgallery.css',
|
|
66
|
+
[
|
|
67
|
+
'handle' => 'theme-lightgallery-styles',
|
|
68
|
+
'css-only' => true,
|
|
69
|
+
]
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
// Core components
|
|
73
|
+
\Kucrut\Vite\enqueue_asset(
|
|
74
|
+
get_template_directory() . '/public/build',
|
|
75
|
+
'resources/core-components/button/button.style.css',
|
|
76
|
+
[
|
|
77
|
+
'handle' => 'theme-button-styles',
|
|
78
|
+
'css-only' => true,
|
|
79
|
+
]
|
|
80
|
+
);
|
|
81
|
+
|
|
82
|
+
// $manifest = \Kucrut\Vite\get_manifest(get_template_directory() . '/public/build');
|
|
83
|
+
|
|
84
|
+
// $components = glob(get_template_directory() . '/resources/core-components/*/');
|
|
85
|
+
// foreach ($components as $component) {
|
|
86
|
+
// $componentName = basename($component);
|
|
87
|
+
// if (!empty($manifest->data->{"resources/core-components/{$componentName}/{$componentName}.script.ts"})) {
|
|
88
|
+
// \Kucrut\Vite\enqueue_asset(
|
|
89
|
+
// get_template_directory() . '/public/build',
|
|
90
|
+
// "resources/core-components/{$componentName}/{$componentName}.script.ts",
|
|
91
|
+
// [
|
|
92
|
+
// 'handle' => "theme-{$componentName}-scripts",
|
|
93
|
+
// ]
|
|
94
|
+
// );
|
|
95
|
+
// }
|
|
96
|
+
|
|
97
|
+
// if (!empty($manifest->data->{"resources/core-components/{$componentName}/{$componentName}.style.css"})) {
|
|
98
|
+
// \Kucrut\Vite\enqueue_asset(
|
|
99
|
+
// get_template_directory() . '/public/build',
|
|
100
|
+
// "resources/core-components/{$componentName}/{$componentName}.style.css",
|
|
101
|
+
// [
|
|
102
|
+
// 'handle' => "theme-{$componentName}-styles",
|
|
103
|
+
// 'css-only' => true,
|
|
104
|
+
// ]
|
|
105
|
+
// );
|
|
106
|
+
// }
|
|
107
|
+
// }
|
|
108
|
+
}, 10);
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Use the generated theme.json file.
|
|
112
|
+
*
|
|
113
|
+
* @return string
|
|
114
|
+
*/
|
|
115
|
+
add_filter('theme_file_path', function ($path, $file) {
|
|
116
|
+
return $file === 'theme.json'
|
|
117
|
+
? public_path('build/assets/theme.json')
|
|
118
|
+
: $path;
|
|
119
|
+
}, 10, 2);
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Add custom classes to body.
|
|
123
|
+
*
|
|
124
|
+
* @param array $classes Array of body classes.
|
|
125
|
+
* @return array Modified array of body classes.
|
|
126
|
+
*/
|
|
127
|
+
add_filter('body_class', function (array $classes): array {
|
|
128
|
+
$classes[] = 'webentor-theme';
|
|
129
|
+
|
|
130
|
+
return $classes;
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
/**
|
|
134
|
+
* Add custom classes to Gutenberg editor wrapper, but only on edit pages.
|
|
135
|
+
*
|
|
136
|
+
* @param string $classes String of editor wrapper classes.
|
|
137
|
+
* @return string Modified string of editor wrapper classes.
|
|
138
|
+
*/
|
|
139
|
+
add_filter('admin_body_class', function (string $classes): string {
|
|
140
|
+
$screen = get_current_screen();
|
|
141
|
+
|
|
142
|
+
if ($screen && $screen->is_block_editor()) {
|
|
143
|
+
$classes .= ' webentor-theme';
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
return $classes;
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Register the initial theme setup.
|
|
151
|
+
*
|
|
152
|
+
* @return void
|
|
153
|
+
*/
|
|
154
|
+
add_action('after_setup_theme', function () {
|
|
155
|
+
/**
|
|
156
|
+
* Load languages.
|
|
157
|
+
*/
|
|
158
|
+
load_theme_textdomain('webentor', get_stylesheet_directory() . '/resources/languages');
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Register the navigation menus.
|
|
162
|
+
*
|
|
163
|
+
* @link https://developer.wordpress.org/reference/functions/register_nav_menus/
|
|
164
|
+
*/
|
|
165
|
+
register_nav_menus([
|
|
166
|
+
'primary_nav' => __('Primary Nav', 'webentor'),
|
|
167
|
+
]);
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Enable plugins to manage the document title.
|
|
171
|
+
*
|
|
172
|
+
* @link https://developer.wordpress.org/reference/functions/add_theme_support/#title-tag
|
|
173
|
+
*/
|
|
174
|
+
add_theme_support('title-tag');
|
|
175
|
+
|
|
176
|
+
/**
|
|
177
|
+
* Enable post thumbnail support.
|
|
178
|
+
*
|
|
179
|
+
* @link https://developer.wordpress.org/themes/functionality/featured-images-post-thumbnails/
|
|
180
|
+
*/
|
|
181
|
+
add_theme_support('post-thumbnails');
|
|
182
|
+
|
|
183
|
+
/**
|
|
184
|
+
* Enable responsive embed support.
|
|
185
|
+
*
|
|
186
|
+
* @link https://developer.wordpress.org/block-editor/how-to-guides/themes/theme-support/#responsive-embedded-content
|
|
187
|
+
*/
|
|
188
|
+
add_theme_support('responsive-embeds');
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Enable HTML5 markup support.
|
|
192
|
+
*
|
|
193
|
+
* @link https://developer.wordpress.org/reference/functions/add_theme_support/#html5
|
|
194
|
+
*/
|
|
195
|
+
add_theme_support('html5', [
|
|
196
|
+
'caption',
|
|
197
|
+
'comment-form',
|
|
198
|
+
'comment-list',
|
|
199
|
+
'gallery',
|
|
200
|
+
'search-form',
|
|
201
|
+
'script',
|
|
202
|
+
'style',
|
|
203
|
+
]);
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Enable selective refresh for widgets in customizer.
|
|
207
|
+
*
|
|
208
|
+
* @link https://developer.wordpress.org/reference/functions/add_theme_support/#customize-selective-refresh-widgets
|
|
209
|
+
*/
|
|
210
|
+
add_theme_support('customize-selective-refresh-widgets');
|
|
211
|
+
}, 20);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "webikon/webentor-theme",
|
|
3
|
+
"type": "wordpress-theme",
|
|
4
|
+
"version": "2.0.6",
|
|
5
|
+
"description": "Webentor starter theme",
|
|
6
|
+
"homepage": "https://webikon.sk",
|
|
7
|
+
"authors": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Roots",
|
|
10
|
+
"homepage": "https://github.com/roots/sage"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Webikon s.r.o.",
|
|
14
|
+
"email": "support@webikon.sk",
|
|
15
|
+
"homepage": "https://webikon.sk"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Pavol Caban",
|
|
19
|
+
"email": "pavol.caban@webikon.sk",
|
|
20
|
+
"homepage": "https://webikon.sk"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"repositories": [
|
|
24
|
+
{
|
|
25
|
+
"type": "github",
|
|
26
|
+
"url": "https://github.com/webikon/webentor-core.git"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"autoload": {
|
|
30
|
+
"psr-4": {
|
|
31
|
+
"App\\": "app/"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"php": ">=8.3",
|
|
36
|
+
"johnbillion/extended-cpts": "^5.0",
|
|
37
|
+
"log1x/acf-composer": "^3.0",
|
|
38
|
+
"log1x/sage-directives": "^2.0",
|
|
39
|
+
"log1x/sage-svg": "^2.0",
|
|
40
|
+
"roots/acorn": "^5.0",
|
|
41
|
+
"roots/acorn-prettify": "^1.0",
|
|
42
|
+
"stoutlogic/acf-builder": "^1.12",
|
|
43
|
+
"webikon/webentor-core": "^0.12"
|
|
44
|
+
},
|
|
45
|
+
"require-dev": {
|
|
46
|
+
"squizlabs/php_codesniffer": "^3.8.0"
|
|
47
|
+
},
|
|
48
|
+
"config": {
|
|
49
|
+
"optimize-autoloader": true,
|
|
50
|
+
"preferred-install": "dist",
|
|
51
|
+
"sort-packages": true
|
|
52
|
+
},
|
|
53
|
+
"minimum-stability": "dev",
|
|
54
|
+
"prefer-stable": true,
|
|
55
|
+
"scripts": {
|
|
56
|
+
"post-autoload-dump": [
|
|
57
|
+
"Roots\\Acorn\\ComposerScripts::postAutoloadDump"
|
|
58
|
+
],
|
|
59
|
+
"lint": [
|
|
60
|
+
"phpcs --extensions=php --standard=PSR12 app"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webikon/webentor-theme",
|
|
3
|
+
"version": "2.0.6",
|
|
4
|
+
"private": true,
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=20.0.0"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "vite --configLoader runner",
|
|
11
|
+
"build": "vite build --configLoader runner",
|
|
12
|
+
"lint": "npm run lint:js && npm run lint:css",
|
|
13
|
+
"lint:js": "eslint resources/scripts resources/blocks",
|
|
14
|
+
"lint:css": "stylelint \"resources/**/*.{vue,css,sass,scss,less}\"",
|
|
15
|
+
"translate": "pnpm build && pnpm translate:pot && pnpm translate:update",
|
|
16
|
+
"translate:pot": "wp i18n make-pot . ./resources/languages/webentor.pot --include=\"parts,templates,app,resources\" --skip-block-json",
|
|
17
|
+
"translate:update": "wp i18n update-po ./resources/languages/webentor.pot ./resources/languages",
|
|
18
|
+
"translate:compile": "pnpm translate:mo && pnpm translate:js",
|
|
19
|
+
"translate:js": "wp i18n make-json ./resources/languages --pretty-print",
|
|
20
|
+
"translate:mo": "wp i18n make-mo ./resources/languages ./resources/languages",
|
|
21
|
+
"prettier-check": "prettier --check 'resources/**/*.{js,ts,tsx,css}'",
|
|
22
|
+
"prettier-check:js": "prettier --check 'resources/**/*.{js,ts,tsx}'",
|
|
23
|
+
"prettier-check:css": "prettier --check 'resources/**/*.css'",
|
|
24
|
+
"prettier-check:blade": "prettier --check 'resources/**/*.blade.php'",
|
|
25
|
+
"prettier-fix": "prettier --write 'resources/**/*.{js,ts,tsx,css}'",
|
|
26
|
+
"prettier-fix:js": "prettier --write 'resources/**/*.{js,ts,tsx}'",
|
|
27
|
+
"prettier-fix:css": "prettier --write 'resources/**/*.css'",
|
|
28
|
+
"prettier-fix:blade": "prettier --write 'resources/**/*.blade.php'",
|
|
29
|
+
"postinstall": "cd ../../../../ && husky",
|
|
30
|
+
"webentor:update": "pnpm up @webikon/webentor-core && composer update webikon/webentor-core"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@10up/block-components": "^1.21.4",
|
|
34
|
+
"@eslint/js": "^9.39.1",
|
|
35
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.7.0",
|
|
36
|
+
"@kucrut/vite-for-wp": "^0.12.0",
|
|
37
|
+
"@roots/vite-plugin": "^1.2.3",
|
|
38
|
+
"@shufo/prettier-plugin-blade": "^1.16.1",
|
|
39
|
+
"@tailwindcss/postcss": "^4.1.17",
|
|
40
|
+
"@tailwindcss/vite": "^4.1.17",
|
|
41
|
+
"@types/wordpress__block-editor": "^14.21.2",
|
|
42
|
+
"@vitejs/plugin-react": "^5.1.1",
|
|
43
|
+
"@webikon/webentor-core": "^0.12.0",
|
|
44
|
+
"@webikon/webentor-configs": "^1.0.2",
|
|
45
|
+
"@wordpress/block-editor": "^15.9.0",
|
|
46
|
+
"@wordpress/block-library": "^9.36.0",
|
|
47
|
+
"@wordpress/blocks": "^15.9.0",
|
|
48
|
+
"@wordpress/components": "^30.9.0",
|
|
49
|
+
"@wordpress/dependency-extraction-webpack-plugin": "^6.36.0",
|
|
50
|
+
"@wordpress/i18n": "^6.9.0",
|
|
51
|
+
"@wordpress/icons": "^11.3.0",
|
|
52
|
+
"eslint": "^9.39.1",
|
|
53
|
+
"eslint-config-prettier": "^10.1.8",
|
|
54
|
+
"eslint-plugin-prettier": "^5.5.4",
|
|
55
|
+
"eslint-plugin-react": "^7.37.5",
|
|
56
|
+
"husky": "^9.1.7",
|
|
57
|
+
"laravel-vite-plugin": "^2.0.1",
|
|
58
|
+
"lint-staged": "^16.2.7",
|
|
59
|
+
"patch-package": "^8.0.1",
|
|
60
|
+
"postcss": "^8.5.6",
|
|
61
|
+
"postcss-pxtorem": "^6.1.0",
|
|
62
|
+
"prettier": "^3.7.4",
|
|
63
|
+
"prettier-plugin-tailwindcss": "^0.7.2",
|
|
64
|
+
"react": "^18.3.1",
|
|
65
|
+
"react-dom": "^18.3.1",
|
|
66
|
+
"rollup-plugin-external-globals": "^0.13.0",
|
|
67
|
+
"stylelint": "^16.26.1",
|
|
68
|
+
"stylelint-config-recommended": "^17.0.0",
|
|
69
|
+
"tailwindcss": "^4.1.17",
|
|
70
|
+
"typescript": "^5.9.3",
|
|
71
|
+
"typescript-eslint": "^8.48.1",
|
|
72
|
+
"vite": "^7.2.6",
|
|
73
|
+
"vite-plugin-external": "^6.2.2"
|
|
74
|
+
},
|
|
75
|
+
"lint-staged": {
|
|
76
|
+
"*.{js,ts,tsx}": "pnpm lint:js",
|
|
77
|
+
"*.css": "pnpm lint:css"
|
|
78
|
+
},
|
|
79
|
+
"dependencies": {
|
|
80
|
+
"@alpinejs/intersect": "^3.15.2",
|
|
81
|
+
"@imacrayon/alpine-ajax": "^0.12.6",
|
|
82
|
+
"alpinejs-masonry": "^1.0.16",
|
|
83
|
+
"lightgallery": "2.9.0"
|
|
84
|
+
},
|
|
85
|
+
"packageManager": "pnpm@10.15.1+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67"
|
|
86
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
<?php
|
|
2
|
+
|
|
3
|
+
namespace App;
|
|
4
|
+
|
|
5
|
+
use Illuminate\Support\Facades\File;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* A consumer theme that already restructured (or never matched) the canonical
|
|
9
|
+
* shape — only the editor JS is enqueued here. The migration must leave this
|
|
10
|
+
* file completely untouched (idempotent / conservative no-op).
|
|
11
|
+
*/
|
|
12
|
+
add_action('enqueue_block_editor_assets', function (): void {
|
|
13
|
+
$dependencies = File::exists(get_template_directory() . '/public/build/editor.deps.json') ? File::json(get_template_directory() . '/public/build/editor.deps.json') : [];
|
|
14
|
+
|
|
15
|
+
\Kucrut\Vite\enqueue_asset(
|
|
16
|
+
get_template_directory() . '/public/build',
|
|
17
|
+
'resources/scripts/editor.ts',
|
|
18
|
+
[
|
|
19
|
+
'handle' => 'theme-blocks-editor',
|
|
20
|
+
'dependencies' => $dependencies,
|
|
21
|
+
'in-footer' => true,
|
|
22
|
+
]
|
|
23
|
+
);
|
|
24
|
+
}, 10);
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "webikon/webentor-theme",
|
|
3
|
+
"type": "wordpress-theme",
|
|
4
|
+
"version": "2.0.6",
|
|
5
|
+
"description": "Webentor starter theme",
|
|
6
|
+
"homepage": "https://webikon.sk",
|
|
7
|
+
"authors": [
|
|
8
|
+
{
|
|
9
|
+
"name": "Roots",
|
|
10
|
+
"homepage": "https://github.com/roots/sage"
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
"name": "Webikon s.r.o.",
|
|
14
|
+
"email": "support@webikon.sk",
|
|
15
|
+
"homepage": "https://webikon.sk"
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"name": "Pavol Caban",
|
|
19
|
+
"email": "pavol.caban@webikon.sk",
|
|
20
|
+
"homepage": "https://webikon.sk"
|
|
21
|
+
}
|
|
22
|
+
],
|
|
23
|
+
"repositories": [
|
|
24
|
+
{
|
|
25
|
+
"type": "github",
|
|
26
|
+
"url": "https://github.com/webikon/webentor-core.git"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
"autoload": {
|
|
30
|
+
"psr-4": {
|
|
31
|
+
"App\\": "app/"
|
|
32
|
+
}
|
|
33
|
+
},
|
|
34
|
+
"require": {
|
|
35
|
+
"php": ">=8.3",
|
|
36
|
+
"johnbillion/extended-cpts": "^5.0",
|
|
37
|
+
"log1x/acf-composer": "^3.0",
|
|
38
|
+
"log1x/sage-directives": "^2.0",
|
|
39
|
+
"log1x/sage-svg": "^2.0",
|
|
40
|
+
"roots/acorn": "^5.0",
|
|
41
|
+
"roots/acorn-prettify": "^1.0",
|
|
42
|
+
"stoutlogic/acf-builder": "^1.12",
|
|
43
|
+
"webikon/webentor-core": "^0.13"
|
|
44
|
+
},
|
|
45
|
+
"require-dev": {
|
|
46
|
+
"squizlabs/php_codesniffer": "^3.8.0"
|
|
47
|
+
},
|
|
48
|
+
"config": {
|
|
49
|
+
"optimize-autoloader": true,
|
|
50
|
+
"preferred-install": "dist",
|
|
51
|
+
"sort-packages": true
|
|
52
|
+
},
|
|
53
|
+
"minimum-stability": "dev",
|
|
54
|
+
"prefer-stable": true,
|
|
55
|
+
"scripts": {
|
|
56
|
+
"post-autoload-dump": [
|
|
57
|
+
"Roots\\Acorn\\ComposerScripts::postAutoloadDump"
|
|
58
|
+
],
|
|
59
|
+
"lint": [
|
|
60
|
+
"phpcs --extensions=php --standard=PSR12 app"
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@webikon/webentor-theme",
|
|
3
|
+
"version": "2.0.6",
|
|
4
|
+
"private": true,
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=20.0.0"
|
|
7
|
+
},
|
|
8
|
+
"type": "module",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"dev": "vite --configLoader runner",
|
|
11
|
+
"build": "vite build --configLoader runner",
|
|
12
|
+
"lint": "npm run lint:js && npm run lint:css",
|
|
13
|
+
"lint:js": "eslint resources/scripts resources/blocks",
|
|
14
|
+
"lint:css": "stylelint \"resources/**/*.{vue,css,sass,scss,less}\"",
|
|
15
|
+
"translate": "pnpm build && pnpm translate:pot && pnpm translate:update",
|
|
16
|
+
"translate:pot": "wp i18n make-pot . ./resources/languages/webentor.pot --include=\"parts,templates,app,resources\" --skip-block-json",
|
|
17
|
+
"translate:update": "wp i18n update-po ./resources/languages/webentor.pot ./resources/languages",
|
|
18
|
+
"translate:compile": "pnpm translate:mo && pnpm translate:js",
|
|
19
|
+
"translate:js": "wp i18n make-json ./resources/languages --pretty-print",
|
|
20
|
+
"translate:mo": "wp i18n make-mo ./resources/languages ./resources/languages",
|
|
21
|
+
"prettier-check": "prettier --check 'resources/**/*.{js,ts,tsx,css}'",
|
|
22
|
+
"prettier-check:js": "prettier --check 'resources/**/*.{js,ts,tsx}'",
|
|
23
|
+
"prettier-check:css": "prettier --check 'resources/**/*.css'",
|
|
24
|
+
"prettier-check:blade": "prettier --check 'resources/**/*.blade.php'",
|
|
25
|
+
"prettier-fix": "prettier --write 'resources/**/*.{js,ts,tsx,css}'",
|
|
26
|
+
"prettier-fix:js": "prettier --write 'resources/**/*.{js,ts,tsx}'",
|
|
27
|
+
"prettier-fix:css": "prettier --write 'resources/**/*.css'",
|
|
28
|
+
"prettier-fix:blade": "prettier --write 'resources/**/*.blade.php'",
|
|
29
|
+
"postinstall": "cd ../../../../ && husky",
|
|
30
|
+
"webentor:update": "pnpm up @webikon/webentor-core && composer update webikon/webentor-core"
|
|
31
|
+
},
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"@10up/block-components": "^1.22.2",
|
|
34
|
+
"@eslint/js": "^9.39.2",
|
|
35
|
+
"@ianvs/prettier-plugin-sort-imports": "^4.7.1",
|
|
36
|
+
"@kucrut/vite-for-wp": "^0.12.0",
|
|
37
|
+
"@roots/vite-plugin": "^1.3.1",
|
|
38
|
+
"@shufo/prettier-plugin-blade": "^1.16.2",
|
|
39
|
+
"@tailwindcss/postcss": "^4.3.1",
|
|
40
|
+
"@tailwindcss/vite": "^4.3.1",
|
|
41
|
+
"@types/wordpress__block-editor": "^15.0.6",
|
|
42
|
+
"@vitejs/plugin-react": "^5.2.0",
|
|
43
|
+
"@webikon/webentor-core": "^0.13.0",
|
|
44
|
+
"@webikon/webentor-configs": "^1.0.2",
|
|
45
|
+
"@wordpress/block-editor": "^15.21.1",
|
|
46
|
+
"@wordpress/block-library": "^9.48.1",
|
|
47
|
+
"@wordpress/blocks": "^15.21.1",
|
|
48
|
+
"@wordpress/components": "^35.0.1",
|
|
49
|
+
"@wordpress/dependency-extraction-webpack-plugin": "^6.48.1",
|
|
50
|
+
"@wordpress/i18n": "^6.21.1",
|
|
51
|
+
"@wordpress/icons": "^14.0.1",
|
|
52
|
+
"eslint": "^9.39.2",
|
|
53
|
+
"eslint-config-prettier": "^10.1.8",
|
|
54
|
+
"eslint-plugin-prettier": "^5.5.6",
|
|
55
|
+
"eslint-plugin-react": "^7.37.5",
|
|
56
|
+
"husky": "^9.1.7",
|
|
57
|
+
"laravel-vite-plugin": "^2.0.1",
|
|
58
|
+
"lint-staged": "^16.4.0",
|
|
59
|
+
"patch-package": "^8.0.1",
|
|
60
|
+
"postcss": "^8.5.15",
|
|
61
|
+
"postcss-pxtorem": "^6.1.0",
|
|
62
|
+
"prettier": "^3.8.4",
|
|
63
|
+
"prettier-plugin-tailwindcss": "^0.8.0",
|
|
64
|
+
"react": "^18.3.1",
|
|
65
|
+
"react-dom": "^18.3.1",
|
|
66
|
+
"rollup-plugin-external-globals": "^0.13.0",
|
|
67
|
+
"stylelint": "^17.13.0",
|
|
68
|
+
"stylelint-config-recommended": "^18.0.0",
|
|
69
|
+
"tailwindcss": "^4.3.1",
|
|
70
|
+
"typescript": "^5.9.3",
|
|
71
|
+
"typescript-eslint": "^8.61.1",
|
|
72
|
+
"vite": "^7.3.5",
|
|
73
|
+
"vite-plugin-external": "^6.2.2"
|
|
74
|
+
},
|
|
75
|
+
"lint-staged": {
|
|
76
|
+
"*.{js,ts,tsx}": "pnpm lint:js",
|
|
77
|
+
"*.css": "pnpm lint:css"
|
|
78
|
+
},
|
|
79
|
+
"dependencies": {
|
|
80
|
+
"@alpinejs/intersect": "^3.15.12",
|
|
81
|
+
"@imacrayon/alpine-ajax": "^0.12.6",
|
|
82
|
+
"alpinejs-masonry": "^1.0.16",
|
|
83
|
+
"lightgallery": "2.9.0"
|
|
84
|
+
},
|
|
85
|
+
"packageManager": "pnpm@10.15.1+sha512.34e538c329b5553014ca8e8f4535997f96180a1d0f614339357449935350d924e22f8614682191264ec33d1462ac21561aff97f6bb18065351c162c7e8f6de67"
|
|
86
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "./schema.json",
|
|
3
|
+
"migrations": [
|
|
4
|
+
{
|
|
5
|
+
"id": "0.13.0",
|
|
6
|
+
"title": "Upgrade consumer theme to webentor-core 0.13.0",
|
|
7
|
+
"description": "WP 7.0 iframe editor-asset enqueue change (app/setup.php) plus the full dependency bump set for 0.13.0 — webentor-core ^0.13 and the aligned third-party ranges in package.json + composer.json.",
|
|
8
|
+
"appliesTo": {
|
|
9
|
+
"package": "webentor-core",
|
|
10
|
+
"from": "0.12.0",
|
|
11
|
+
"to": "0.13.0"
|
|
12
|
+
},
|
|
13
|
+
"rules": ["rules/editor-enqueue-iframe.yml", "rules/deps.yml"],
|
|
14
|
+
"docs": "README.md"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
}
|