feat(ext-blog): Add markdown editor bundling and dependencies

This commit is contained in:
2026-12-02 11:09:09 +01:00
parent 19e6b1a332
commit e0767b65e6
8 changed files with 601 additions and 453 deletions
-8
View File
@@ -13,13 +13,10 @@ const GRAPES_JS_PATH = path.resolve(__dirname, 'node_modules/grapesjs/dist/grape
const GRAPES_CSS_PATH = path.resolve(__dirname, 'node_modules/grapesjs/dist/css/grapes.min.css');
const DIST_DIR = path.resolve(__dirname, 'dist');
const DIST_PB_DIR = path.resolve(DIST_DIR, 'pagebuilder');
const BLOG_EDITOR_SOURCE = path.resolve(__dirname, '../extensions/plugi-ext-blog/admin/assets/src/markdown-editor.js');
const BLOG_EDITOR_OUTPUT = path.resolve(__dirname, '../extensions/plugi-ext-blog/admin/assets/markdown-editor.js');
function ensureDirectories() {
fs.mkdirSync(DIST_DIR, { recursive: true });
fs.mkdirSync(DIST_PB_DIR, { recursive: true });
fs.mkdirSync(path.dirname(BLOG_EDITOR_OUTPUT), { recursive: true });
}
function verifyPreconditions() {
@@ -166,10 +163,6 @@ async function buildWebsiteManagerJs() {
);
}
async function buildBlogMarkdownEditor() {
await bundleJs(BLOG_EDITOR_SOURCE, BLOG_EDITOR_OUTPUT, { minify: !isDev });
}
function runTailwindCli({
watch = false,
input = path.resolve(__dirname, 'src/Modules/WebsiteManager/resources/assets/css/style.css'),
@@ -224,7 +217,6 @@ async function buildAll() {
await Promise.all([
buildWebsiteManagerJs(),
buildBlogMarkdownEditor(),
runTailwindCli({ watch: false }),
runTailwindCli({
watch: false,