From f04cf5104778b0f836a62dc3bdb76874247bcaf5 Mon Sep 17 00:00:00 2001 From: codecalm Date: Sat, 1 Feb 2025 22:06:08 +0100 Subject: [PATCH] Update output paths in build configuration and HTML templates to use 'preview' directory --- preview/build/rollup.config.mjs | 2 +- preview/package.json | 10 +++++----- preview/pages/_includes/layout/css.html | 2 +- preview/pages/_includes/layout/js.html | 2 +- preview/pages/_layouts/base.html | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/preview/build/rollup.config.mjs b/preview/build/rollup.config.mjs index 6f91b8593..804841509 100644 --- a/preview/build/rollup.config.mjs +++ b/preview/build/rollup.config.mjs @@ -31,7 +31,7 @@ const rollupConfig = { output: { name: 'demo', banner: banner('Demo'), - dir: path.resolve(__dirname, `../dist/demo/js`), + dir: path.resolve(__dirname, `../dist/preview/js`), format: 'esm', generatedCode: 'es2015' }, diff --git a/preview/package.json b/preview/package.json index 78d161008..cb5209557 100644 --- a/preview/package.json +++ b/preview/package.json @@ -9,14 +9,14 @@ "watch-js": "nodemon --watch js/ --ext js --exec 'pnpm run js'", "watch-css": "nodemon --watch scss/ --ext scss --exec 'pnpm run css'", "css": "pnpm run css-compile && pnpm run css-prefix && pnpm run css-minify", - "css-compile": "sass scss/:dist/demo/css/ --no-source-map --load-path=node_modules", - "css-prefix": "postcss --config build/postcss.config.mjs --replace 'dist/demo/css/*.css' '!dist/demo/css/*.rtl*.css' '!dist/demo/css/*.min.css'", - "css-minify": "cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output dist/demo/css/ --batch --batch-suffix '.min' 'dist/demo/css/*.css' '!dist/demo/css/*.min.css' '!dist/demo/css/*rtl*.css'", + "css-compile": "sass scss/:dist/preview/css/ --no-source-map --load-path=node_modules", + "css-prefix": "postcss --config build/postcss.config.mjs --replace 'dist/preview/css/*.css' '!dist/preview/css/*.rtl*.css' '!dist/preview/css/*.min.css'", + "css-minify": "cleancss -O1 --format breakWith=lf --with-rebase --source-map --source-map-inline-sources --output dist/preview/css/ --batch --batch-suffix '.min' 'dist/preview/css/*.css' '!dist/preview/css/*.min.css' '!dist/preview/css/*rtl*.css'", "js": "pnpm run js-compile && pnpm run js-minify", "js-compile": "rollup --config build/rollup.config.mjs --sourcemap", "js-minify": "pnpm run js-minify-demo && pnpm run js-minify-theme", - "js-minify-demo": "terser --compress passes=2 --mangle --comments '/^!/' --source-map 'content=dist/demo/js/demo.js.map,includeSources,url=demo.min.js.map' --output dist/demo/js/demo.min.js dist/demo/js/demo.js", - "js-minify-theme": "terser --compress passes=2 --mangle --comments '/^!/' --source-map 'content=dist/demo/js/demo-theme.js.map,includeSources,url=demo-theme.min.js.map' --output dist/demo/js/demo-theme.min.js dist/demo/js/demo-theme.js", + "js-minify-demo": "terser --compress passes=2 --mangle --comments '/^!/' --source-map 'content=dist/preview/js/demo.js.map,includeSources,url=demo.min.js.map' --output dist/preview/js/demo.min.js dist/preview/js/demo.js", + "js-minify-theme": "terser --compress passes=2 --mangle --comments '/^!/' --source-map 'content=dist/preview/js/demo-theme.js.map,includeSources,url=demo-theme.min.js.map' --output dist/preview/js/demo-theme.min.js dist/preview/js/demo-theme.js", "clean": "rm -rf dist demo", "html": "eleventy", "svg-optimize": "svgo -f svg/brand --pretty", diff --git a/preview/pages/_includes/layout/css.html b/preview/pages/_includes/layout/css.html index 30c7b8e5d..a71c1cb52 100644 --- a/preview/pages/_includes/layout/css.html +++ b/preview/pages/_includes/layout/css.html @@ -20,4 +20,4 @@ {% endfor %} - \ No newline at end of file + \ No newline at end of file diff --git a/preview/pages/_includes/layout/js.html b/preview/pages/_includes/layout/js.html index 79d8813a8..13f7b2ff5 100644 --- a/preview/pages/_includes/layout/js.html +++ b/preview/pages/_includes/layout/js.html @@ -17,7 +17,7 @@ - + {% for script in site.captured_global.scripts %} diff --git a/preview/pages/_layouts/base.html b/preview/pages/_layouts/base.html index c736b5e1c..55846f3e5 100644 --- a/preview/pages/_layouts/base.html +++ b/preview/pages/_layouts/base.html @@ -38,7 +38,7 @@ {% assign layout-dark = layout-dark | default: site.layoutDark %} - + {{ content }}