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:
-1903
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Vendored
+5
File diff suppressed because one or more lines are too long
Vendored
+2511
-1
File diff suppressed because one or more lines are too long
@@ -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>
|
||||
|
||||
Generated
+2096
-2262
File diff suppressed because it is too large
Load Diff
@@ -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",
|
||||
|
||||
@@ -1,6 +0,0 @@
|
||||
module.exports = {
|
||||
plugins: {
|
||||
tailwindcss: {},
|
||||
autoprefixer: {},
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,3 @@
|
||||
import './style.css'
|
||||
// import typescriptLogo from './typescript.svg'
|
||||
import Alpine from 'alpinejs'
|
||||
import {localeMapper} from "./helpers/localemapper.ts";
|
||||
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
@import "tailwindcss";
|
||||
@plugin "daisyui";
|
||||
|
||||
Vendored
-1
@@ -1 +0,0 @@
|
||||
/// <reference types="vite/client" />
|
||||
@@ -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")
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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',
|
||||
},
|
||||
},
|
||||
})
|
||||
Reference in New Issue
Block a user