mirror of
https://github.com/elementor/hello-theme.git
synced 2026-07-26 12:26:54 +08:00
Some checks failed
PHPUnit / File Diff (push) Failing after 0s
Build / Build theme (push) Failing after 1s
Lint / PHPCS (push) Failing after 0s
Lint / ESLint (push) Failing after 1m18s
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 7.4 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.0 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.1 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.2 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.8 - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - WordPress 6.9 - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - WordPress latest - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - WordPress nightly - PHP version 8.3 (push) Has been skipped
PHPUnit / PHPUnit - Test Results (push) Successful in 2s
* update: remove items from menu * Cleanup: remove dead code from theme builder/site planner submenu removal Removes the enqueue script, webpack entry, and unused Utils helpers that only existed to support the Theme Builder and AI Site Planner submenu items removed from the Hello admin sidebar. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
94 lines
2.3 KiB
JavaScript
94 lines
2.3 KiB
JavaScript
// WordPress webpack config:
|
|
const defaultConfig = require('@wordpress/scripts/config/webpack.config');
|
|
|
|
//Plugins:
|
|
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
const RemoveEmptyScriptsPlugin = require('webpack-remove-empty-scripts');
|
|
|
|
//Utilities
|
|
const path = require('path');
|
|
const imagesPath = path.resolve(__dirname, './assets/images');
|
|
const modulesDir = process.cwd() + '/modules/';
|
|
|
|
const entryPoints = {
|
|
'css/reset': path.resolve(__dirname, './dev/scss', 'reset.scss'),
|
|
'css/theme': path.resolve(__dirname, './dev/scss', 'theme.scss'),
|
|
'css/header-footer': path.resolve(
|
|
__dirname,
|
|
'./dev/scss',
|
|
'header-footer.scss',
|
|
),
|
|
'css/editor-styles': path.resolve(
|
|
__dirname,
|
|
'./dev/scss',
|
|
'editor-styles.scss',
|
|
),
|
|
'css/editor': path.resolve(__dirname, './dev/scss', 'editor.scss'),
|
|
'css/customizer': path.resolve(__dirname, './dev/scss', 'customizer.scss'),
|
|
|
|
'js/hello-editor': path.resolve(
|
|
__dirname,
|
|
'./dev/js/editor',
|
|
'hello-editor.js',
|
|
),
|
|
'js/hello-frontend': path.resolve(
|
|
__dirname,
|
|
'./dev/js/frontend',
|
|
'hello-frontend.js',
|
|
),
|
|
'js/hello-home-app': path.resolve(
|
|
modulesDir,
|
|
'admin-home/assets/js',
|
|
'hello-elementor-admin.js',
|
|
),
|
|
'js/hello-elementor-settings': path.resolve(
|
|
modulesDir,
|
|
'admin-home/assets/js',
|
|
'hello-elementor-settings.js',
|
|
),
|
|
'js/hello-elementor-topbar': path.resolve(
|
|
modulesDir,
|
|
'admin-home/assets/js',
|
|
'hello-elementor-topbar.js',
|
|
),
|
|
'js/hello-conversion-banner': path.resolve(
|
|
modulesDir,
|
|
'admin-home/assets/js',
|
|
'hello-elementor-conversion-banner.js',
|
|
),
|
|
};
|
|
|
|
module.exports = {
|
|
...defaultConfig,
|
|
...{
|
|
entry: entryPoints,
|
|
output: {
|
|
...defaultConfig.output,
|
|
path: path.resolve(__dirname, './assets'),
|
|
chunkFilename: 'js/[name].js',
|
|
clean: false,
|
|
},
|
|
plugins: [
|
|
// Include WP's plugin config.
|
|
...defaultConfig.plugins,
|
|
|
|
new CopyWebpackPlugin({
|
|
patterns: [
|
|
{
|
|
from: path.resolve(modulesDir, 'admin-home/assets/images'),
|
|
to: imagesPath,
|
|
},
|
|
{
|
|
from: path.resolve(__dirname, 'dev/images'),
|
|
to: imagesPath,
|
|
},
|
|
],
|
|
}),
|
|
// Removes the empty `.js` files generated by webpack but
|
|
// sets it after WP has generated its `*.asset.php` file.
|
|
new RemoveEmptyScriptsPlugin({
|
|
stage: RemoveEmptyScriptsPlugin.STAGE_AFTER_PROCESS_PLUGINS,
|
|
}),
|
|
],
|
|
},
|
|
};
|