diff --git a/.eleventy.js b/.eleventy.js index 090e089..7e00e33 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -1,33 +1,6 @@ -const CleanCSS = require("clean-css"); -// const is_production = typeof process.env.NODE_ENV === "string" && process.env.NODE_ENV === "production"; -const is_production = true; - -function do_minifycss(source, output_path) { - if(!output_path.endsWith(".css") || !is_production) return source; - - const result = new CleanCSS({ - level: 2 - }).minify(source).styles.trim(); - console.log(`MINIFY ${output_path}`, source.length, `→`, result.length, `(${((1 - (result.length / source.length)) * 100).toFixed(2)}% reduction)`); - return result; -} - module.exports = function (eleventyConfig) { // eleventyConfig.addPlugin(EleventyHtmlBasePlugin); - eleventyConfig.addFilter("cssmin", function (code) { - return new CleanCSS({}).minify(code).styles; - }); - - eleventyConfig.addTransform("cssmin", do_minifycss); - - eleventyConfig.addTransform("log", async function (content) { - console.log(this.page.inputPath); - console.log(this.page.outputPath); - - return content; // no changes made. - }); - eleventyConfig.setNunjucksEnvironmentOptions({ // throwOnUndefined: true, trimBlocks: true diff --git a/package-lock.json b/package-lock.json index 9685538..3fabd9d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,6 @@ "license": "MIT", "devDependencies": { "@11ty/eleventy": "^2.0.1", - "clean-css": "^5.3.3", "sass": "^1.69.4" } }, @@ -540,18 +539,6 @@ "fsevents": "~2.3.2" } }, - "node_modules/clean-css": { - "version": "5.3.3", - "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-5.3.3.tgz", - "integrity": "sha512-D5J+kHaVb/wKSFcyyV75uCn8fiY4sV38XJoe4CUyGQ+mOU/fMVYUdH1hJC+CJQ5uY3EnW27SbJYS4X8BiLrAFg==", - "dev": true, - "dependencies": { - "source-map": "~0.6.0" - }, - "engines": { - "node": ">= 10.0" - } - }, "node_modules/color-convert": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", @@ -596,9 +583,9 @@ } }, "node_modules/cross-spawn": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", - "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", "dev": true, "dependencies": { "path-key": "^3.1.0", diff --git a/package.json b/package.json index ef89d82..1ca5063 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,6 @@ "private": true, "devDependencies": { "@11ty/eleventy": "^2.0.1", - "clean-css": "^5.3.3", "sass": "^1.69.4" } } diff --git a/source/screens/demo/examples/portal.njk b/source/screens/demo/examples/portal.njk index 5b96681..8c6bb73 100644 --- a/source/screens/demo/examples/portal.njk +++ b/source/screens/demo/examples/portal.njk @@ -7,7 +7,7 @@ tags: {% set bodyClass = "body_portal" %} {% extends "demo/_default.njk" %} -{% import "hippie/macros/_gate.njk" as gate %} +{% import "demo/macros/_gates.njk" as gate %} {% block title %}{{ title }}{% endblock %} diff --git a/source/screens/demo/examples/ui/new.njk b/source/screens/demo/examples/ui/new.njk index c567309..edc4d47 100755 --- a/source/screens/demo/examples/ui/new.njk +++ b/source/screens/demo/examples/ui/new.njk @@ -8,7 +8,7 @@ tags: {% set bodyClass = "body_new" %} {% extends "demo/_app.njk" %} -{% import "hippie/macros/_state.njk" as state %} +{% import "demo/macros/_states.njk" as state %} {% block title %}{{ title }} {% endblock %} diff --git a/source/templates/demo/eleventyComputed.js b/source/templates/demo/eleventyComputed.js deleted file mode 100644 index cf59717..0000000 --- a/source/templates/demo/eleventyComputed.js +++ /dev/null @@ -1,5 +0,0 @@ -module.exports = { - eleventyComputed: { - path: demoMode ? "/" : "/demo/" - } -}; \ No newline at end of file diff --git a/source/templates/hippie/macros/_gate.njk b/source/templates/demo/macros/_gates.njk similarity index 100% rename from source/templates/hippie/macros/_gate.njk rename to source/templates/demo/macros/_gates.njk diff --git a/source/templates/hippie/macros/_state.njk b/source/templates/demo/macros/_states.njk similarity index 100% rename from source/templates/hippie/macros/_state.njk rename to source/templates/demo/macros/_states.njk