From 8a7341e345193eee7efd5ef460c6a4f3f244b115 Mon Sep 17 00:00:00 2001 From: Ronan Berder Date: Mon, 16 Jun 2025 19:14:39 +0800 Subject: [PATCH] Polishing --- docs/src/_data/site.js | 2 +- docs/src/components/combobox.njk | 2 +- docs/src/components/dropdown-menu.njk | 2 +- docs/src/components/popover.njk | 2 +- docs/src/components/select.njk | 2 +- docs/src/components/sidebar.njk | 2 +- docs/src/components/tabs.njk | 2 +- docs/src/components/toast.njk | 2 +- docs/src/installation.njk | 6 +++--- scripts/build.js | 6 +++--- src/css/{cdn.css => basecoat.cdn.css} | 0 11 files changed, 14 insertions(+), 14 deletions(-) rename src/css/{cdn.css => basecoat.cdn.css} (100%) diff --git a/docs/src/_data/site.js b/docs/src/_data/site.js index 202a9d3..c55da90 100644 --- a/docs/src/_data/site.js +++ b/docs/src/_data/site.js @@ -7,5 +7,5 @@ export default { x: "@hunvreus" }, url: process.env.ELEVENTY_ENV === 'development' ? "http://localhost:8080" : "https://basecoatui.com", - version: "0.2.0" + version: "0.2" }; \ No newline at end of file diff --git a/docs/src/components/combobox.njk b/docs/src/components/combobox.njk index 00ea091..64e8085 100644 --- a/docs/src/components/combobox.njk +++ b/docs/src/components/combobox.njk @@ -56,7 +56,7 @@ toc:

You can either include the JavaScript file for all the components, or just the one for this component by adding this to the <head> of your page:

-{% set code_script %}{% endset %} +{% set code_script %}{% endset %} {{ code_block(code_script | prettyHtml, "html") }}
diff --git a/docs/src/components/dropdown-menu.njk b/docs/src/components/dropdown-menu.njk index af958bb..b1c4a97 100644 --- a/docs/src/components/dropdown-menu.njk +++ b/docs/src/components/dropdown-menu.njk @@ -86,7 +86,7 @@ toc:

You can either include the JavaScript file for all the components, or just the one for this component by adding this to the <head> of your page:

-{% set code_script %}{% endset %} +{% set code_script %}{% endset %} {{ code_block(code_script | prettyHtml, "html") }}
diff --git a/docs/src/components/popover.njk b/docs/src/components/popover.njk index cfcbbf9..213269b 100644 --- a/docs/src/components/popover.njk +++ b/docs/src/components/popover.njk @@ -69,7 +69,7 @@ toc:

You can either include the JavaScript file for all the components, or just the one for this component by adding this to the <head> of your page:

-{% set code_script %}{% endset %} +{% set code_script %}{% endset %} {{ code_block(code_script | prettyHtml, "html") }}
diff --git a/docs/src/components/select.njk b/docs/src/components/select.njk index 7591c6e..544897c 100644 --- a/docs/src/components/select.njk +++ b/docs/src/components/select.njk @@ -88,7 +88,7 @@ toc:

You can either include the JavaScript file for all the components, or just the one for this component by adding this to the <head> of your page:

-{% set code_script %}{% endset %} +{% set code_script %}{% endset %} {{ code_block(code_script | prettyHtml, "html") }}
diff --git a/docs/src/components/sidebar.njk b/docs/src/components/sidebar.njk index f8198a2..3aa12b7 100644 --- a/docs/src/components/sidebar.njk +++ b/docs/src/components/sidebar.njk @@ -32,7 +32,7 @@ toc:

You can either include the JavaScript file for all the components, or just the one for this component by adding this to the <head> of your page:

-{% set code_script %}{% endset %} +{% set code_script %}{% endset %} {{ code_block(code_script | prettyHtml, "html") }}
diff --git a/docs/src/components/tabs.njk b/docs/src/components/tabs.njk index fec51fd..320933a 100644 --- a/docs/src/components/tabs.njk +++ b/docs/src/components/tabs.njk @@ -85,7 +85,7 @@ toc:

You can either include the JavaScript file for all the components, or just the one for this component by adding this to the <head> of your page:

-{% set code_script %}{% endset %} +{% set code_script %}{% endset %} {{ code_block(code_script | prettyHtml, "html") }}
diff --git a/docs/src/components/toast.njk b/docs/src/components/toast.njk index 864929f..c7c4897 100644 --- a/docs/src/components/toast.njk +++ b/docs/src/components/toast.njk @@ -67,7 +67,7 @@ toc:

You can either include the JavaScript file for all the components, or just the one for this component by adding this to the <head> of your page:

-{% set code_script %}{% endset %} +{% set code_script %}{% endset %} {{ code_block(code_script | prettyHtml, "html") }}
diff --git a/docs/src/installation.njk b/docs/src/installation.njk index cc26404..e870f19 100644 --- a/docs/src/installation.njk +++ b/docs/src/installation.njk @@ -39,7 +39,7 @@ toc:

Add the following to the <head> of your HTML file:

-{% set code %} +{% set code %} {% endset %} {{ code_block(code, "html") }} @@ -49,7 +49,7 @@ toc:

While the JavaScript file for all components is small (around 3kB gzipped), you can cherry-pick the components you need as instructed in the component's page (Dropdown Menu, Popover, Select, Sidebar, Tabs and Toast). For example, to add the Dropdown Menu component, add the following to the <head> of your HTML file:

-{% set code %} +{% set code %} {% endset %} {{ code_block(code, "html") }} @@ -107,7 +107,7 @@ import 'basecoat-css/tabs';{% endraw %}{% endset %} {{ code_block(code, "js") }}

Without a build tool

-

Copy the pre-built files from node_modules into your public directory (one-off command):

+

Copy the pre-built files from node_modules into your public directory:

{% set code %}npx copyfiles -u 1 "node_modules/basecoat-css/dist/js/**/*" public/js/basecoat{% endset %} {{ code_block(code, "bash") }} diff --git a/scripts/build.js b/scripts/build.js index c4fdb1e..5eadfff 100644 --- a/scripts/build.js +++ b/scripts/build.js @@ -152,9 +152,9 @@ async function build() { console.log(`Copied basecoat.css to ${cssDistDir}`); // Create Tailwind CSS builds for the CSS package - const cdnCssSrc = path.join(srcCssDir, 'cdn.css'); - const cssDistCdnPath = path.join(cssDistDir, 'cdn.css'); - const cssDistCdnMinPath = path.join(cssDistDir, 'cdn.min.css'); + const cdnCssSrc = path.join(srcCssDir, 'basecoat.cdn.css'); + const cssDistCdnPath = path.join(cssDistDir, 'basecoat.cdn.css'); + const cssDistCdnMinPath = path.join(cssDistDir, 'basecoat.cdn.min.css'); await execPromise(`npx tailwindcss -i "${cdnCssSrc}" -o "${cssDistCdnPath}"`); console.log(`Generated non-minified CSS: ${cssDistCdnPath}`); diff --git a/src/css/cdn.css b/src/css/basecoat.cdn.css similarity index 100% rename from src/css/cdn.css rename to src/css/basecoat.cdn.css