diff --git a/.eleventy.js b/.eleventy.js index 18eb37b..1235bb1 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -87,7 +87,9 @@ export default function (eleventyConfig) { eleventyConfig.addWatchTarget("posts"); /* HTML minifier */ - eleventyConfig.addPlugin(eleventyPluginFilesMinifier); + if (process.env.BUILDMODE === "production") { + eleventyConfig.addPlugin(eleventyPluginFilesMinifier); + } /* RSS Plugin */ eleventyConfig.addPlugin(pluginRss); diff --git a/.github/workflows/eleventy_build.yml b/.github/workflows/eleventy_build.yml index 7a1f635..c0c61c2 100644 --- a/.github/workflows/eleventy_build.yml +++ b/.github/workflows/eleventy_build.yml @@ -43,8 +43,8 @@ jobs: - name: Pull dependencies run: npm install - - name: Build with Vite - run: npx @11ty/eleventy + - name: Build with Eleventy + run: npm run build:prod # Upload _site folder - name: Upload artifact diff --git a/index.html b/index.html index 52bda4f..1234453 100644 --- a/index.html +++ b/index.html @@ -26,4 +26,4 @@

{{ post.data.title }}

{% endif %} {% endfor %}
- \ No newline at end of file +Kiwi in the snow \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a52b4c8..f5d1810 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,8 @@ "@11ty/eleventy-plugin-rss": "^2.0.2", "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0", "@sherby/eleventy-plugin-files-minifier": "^1.1.1", - "ace-builds": "^1.36.5", + "ace-builds": "^1.37.1", + "cross-env": "^7.0.3", "eleventy-plugin-toc": "^1.1.5", "luxon": "^3.5.0", "markdown-it-anchor": "^9.0.1", @@ -22,7 +23,7 @@ "normalize.css": "^8.0.1", "prism-themes": "^1.9.0", "sakura.css": "^1.5.0", - "sass": "^1.82.0" + "sass": "^1.83.1" } }, "node_modules/@11ty/dependency-tree": { @@ -1217,9 +1218,10 @@ "license": "MIT" }, "node_modules/ace-builds": { - "version": "1.36.5", - "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.36.5.tgz", - "integrity": "sha512-mZ5KVanRT6nLRDLqtG/1YQQLX/gZVC/v526cm1Ru/MTSlrbweSmqv2ZT0d2GaHpJq035MwCMIrj+LgDAUnDXrg==" + "version": "1.37.1", + "resolved": "https://registry.npmjs.org/ace-builds/-/ace-builds-1.37.1.tgz", + "integrity": "sha512-6/jxFucA1z1C3hgLlVkTE5/znZ+iYvD301vfwtybiMc3k76IDykliCD0xh/eYZMJUfsJtaOQHZ2AJO5ey0PHWw==", + "license": "BSD-3-Clause" }, "node_modules/acorn": { "version": "8.14.0", @@ -1587,6 +1589,24 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "license": "MIT" }, + "node_modules/cross-env": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha512-+/HKd6EgcQCJGh2PSjZuUitQBQynKor4wrFbRg4DtAgS1aWO+gU52xpH7M9ScGgXSYmAVS9bIJ8EzuaGw0oNAw==", + "license": "MIT", + "dependencies": { + "cross-spawn": "^7.0.1" + }, + "bin": { + "cross-env": "src/bin/cross-env.js", + "cross-env-shell": "src/bin/cross-env-shell.js" + }, + "engines": { + "node": ">=10.14", + "npm": ">=6", + "yarn": ">=1" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -3416,9 +3436,9 @@ "license": "MIT" }, "node_modules/sass": { - "version": "1.82.0", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.82.0.tgz", - "integrity": "sha512-j4GMCTa8elGyN9A7x7bEglx0VgSpNUG4W4wNedQ33wSMdnkqQCT8HTwOaVSV4e6yQovcu/3Oc4coJP/l0xhL2Q==", + "version": "1.83.1", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.83.1.tgz", + "integrity": "sha512-EVJbDaEs4Rr3F0glJzFSOvtg2/oy2V/YrGFPqPY24UqcLDWcI9ZY5sN+qyO3c/QCZwzgfirvhXvINiJCE/OLcA==", "license": "MIT", "dependencies": { "chokidar": "^4.0.0", diff --git a/package.json b/package.json index d271096..371e880 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "type": "module", "main": "index.js", "scripts": { - "test": "echo \"Error: no test specified\" && exit 1" + "build:prod": "cross-env BUILDMODE=production npx @11ty/eleventy" }, "repository": { "type": "git", @@ -23,19 +23,20 @@ }, "homepage": "https://github.com/FrostKiwi/treasurechest#readme", "dependencies": { - "@11ty/eleventy": "^3.0.0", + "@11ty/eleventy": "^3.0.0", "@11ty/eleventy-img": "^5.0.0", "@11ty/eleventy-plugin-rss": "^2.0.2", "@11ty/eleventy-plugin-syntaxhighlight": "^5.0.0", "@sherby/eleventy-plugin-files-minifier": "^1.1.1", + "ace-builds": "^1.37.1", + "cross-env": "^7.0.3", "eleventy-plugin-toc": "^1.1.5", "luxon": "^3.5.0", "markdown-it-anchor": "^9.0.1", "markdown-it-link-attributes": "^4.0.1", + "normalize.css": "^8.0.1", "prism-themes": "^1.9.0", "sakura.css": "^1.5.0", - "ace-builds": "^1.36.5", - "normalize.css": "^8.0.1", - "sass": "^1.82.0" + "sass": "^1.83.1" } }