update theme-one asset building

Migrate from Vite to Rolldown for JS bundling and Tailwind CSS v4 with CLI build.
Remove Vite config, PostCSS config, and Tailwind config files.
Update master layout to include script.js and extension header assets.
This commit is contained in:
2026-11-23 09:00:03 +01:00
parent f072349ed2
commit 84f3be9fe0
13 changed files with 4624 additions and 4237 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+2511 -1
View File
File diff suppressed because one or more lines are too long
+4
View File
@@ -14,14 +14,18 @@ use Plugi\Repositories\MenuRepository;
$page->getTranslation("meta_description"),
) ?>">
<link href="<?= phpb_asset("icons/duotone/style.css") ?>" rel="stylesheet">
<link href="<?= phpb_asset("icons/regular/style.css") ?>" rel="stylesheet">
<link href="<?= phpb_asset("icons/bold/style.css") ?>" rel="stylesheet">
<link href="<?= phpb_theme_asset("dist/style.css") ?>" rel="stylesheet">
<?= Extensions::getHtmlBlocks() ?>
<?= Extensions::getHeaderAssets() ?>
<?php phpb_registered_assets('header'); ?>
<script src="<?= phpb_theme_asset("dist/script.js") ?>"></script>
</head>
<body>
+2096 -2262
View File
File diff suppressed because it is too large Load Diff
+6 -7
View File
@@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "npm-watch build",
"build": "tsc && vite build"
"build": "tsc && rolldown src/main.ts --file dist/script.js -m && npx @tailwindcss/cli -i ./src/style.css -o ./dist/style.css"
},
"watch": {
"build": {
@@ -20,13 +20,12 @@
}
},
"devDependencies": {
"autoprefixer": "^10.4.14",
"daisyui": "^3.0.3",
"@tailwindcss/cli": "^4.3.5",
"daisyui": "^5.8.2",
"npm-watch": "^0.11.0",
"postcss": "^8.4.24",
"tailwindcss": "^3.3.2",
"typescript": "^5.1.6",
"vite": "^4.3.9"
"rolldown": "^1.3.3",
"tailwindcss": "^4.3.5",
"typescript": "^6.0.3"
},
"dependencies": {
"@types/alpinejs": "^3.7.2",
-6
View File
@@ -1,6 +0,0 @@
module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
}
}
-2
View File
@@ -1,5 +1,3 @@
import './style.css'
// import typescriptLogo from './typescript.svg'
import Alpine from 'alpinejs'
import {localeMapper} from "./helpers/localemapper.ts";
+2 -3
View File
@@ -1,3 +1,2 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@import "tailwindcss";
@plugin "daisyui";
-1
View File
@@ -1 +0,0 @@
/// <reference types="vite/client" />
-33
View File
@@ -1,33 +0,0 @@
/** @type {import('tailwindcss').Config} */
module.exports = {
content: [
"./pages/**/*.{html,ts,php}",
"./src/**/*.{html,ts,php}",
"./blocks/**/*.{html,ts,php}",
"./layouts/**/*.{html,ts,php}",
"./node_modules/flowbite/**/*.js",
],
theme: {
extend: {
colors: {
'primary': {
'50': '#f6faf3',
'100': '#e9f5e3',
'200': '#d3eac8',
'300': '#afd89d',
'400': '#82bd69',
'500': '#61a146',
'600': '#4c8435',
'700': '#3d692c',
'800': '#345427',
'900': '#2b4522',
'950': '#13250e',
},
}
},
},
plugins: [
require("daisyui")
]
}
-14
View File
@@ -1,14 +0,0 @@
// vite.config.js
import { resolve } from 'path'
import { defineConfig } from 'vite'
export default defineConfig({
build: {
lib: {
// Could also be a dictionary or array of multiple entry points
entry: resolve(__dirname, 'src/main.ts'),
name: 'phpb-demo-template',
fileName: 'phpb-demo-template',
},
},
})