♻️ Restructure: Move Astro to repository root

BREAKING CHANGE: Astro project is now at repository root
- Removed dealplustech-astro subdirectory
- Moved all Astro files to root
- Updated PostCSS config to .cjs
- Removed old Next.js files

 11 pages built successfully
 Cookie consent banner included
 Privacy/Terms links in footer
 Ready for Easypanel deployment (no root dir needed)

Migration path:
- Old structure: /dealplustech-astro/
- New structure: / (root)
This commit is contained in:
Kunthawat Greethong
2026-03-09 22:00:05 +07:00
parent 5b041a6a44
commit 7a67f68d9f
16524 changed files with 4277 additions and 1983574 deletions

View File

@@ -1,2 +0,0 @@
import type { Plugin } from 'vite';
export default function astro(): Plugin;

View File

@@ -1,48 +0,0 @@
import { parse } from "acorn";
import { walk } from "estree-walker";
import MagicString from "magic-string";
import { isMarkdownFile } from "../core/util.js";
const ASTRO_GLOB_REGEX = /Astro2?\s*\.\s*glob\s*\(/;
function astro() {
return {
name: "astro:postprocess",
async transform(code, id) {
if (!id.endsWith(".astro") && !isMarkdownFile(id)) {
return null;
}
if (!ASTRO_GLOB_REGEX.test(code)) {
return null;
}
let s;
const ast = parse(code, {
ecmaVersion: "latest",
sourceType: "module"
});
walk(ast, {
enter(node) {
if (node.type === "CallExpression" && node.callee.type === "MemberExpression" && node.callee.property.name === "glob" && (node.callee.object.name === "Astro" || node.callee.object.name === "Astro2") && node.arguments.length) {
const firstArgStart = node.arguments[0].start;
const firstArgEnd = node.arguments[0].end;
const lastArgEnd = node.arguments[node.arguments.length - 1].end;
const firstArg = code.slice(firstArgStart, firstArgEnd);
s ??= new MagicString(code);
s.overwrite(
firstArgStart,
lastArgEnd,
`import.meta.glob(${firstArg}), () => ${firstArg}`
);
}
}
});
if (s) {
return {
code: s.toString(),
map: s.generateMap({ hires: "boundary" })
};
}
}
};
}
export {
astro as default
};