From 9abf7fcc6bf4bdadd1b7b62b6749ec0036fc6530 Mon Sep 17 00:00:00 2001 From: ayo Date: Fri, 30 May 2025 01:24:39 +0200 Subject: [PATCH] chore: housekeeping (#54) * chore: remove lit & fast reference in readme * chore: remove sourcehut build automation * chore(docs): various changes --- .build.yml | 35 ------------------- README.md | 6 ++-- .../content/docs/guides/getting-started.mdx | 4 +-- docs/src/content/docs/guides/why.md | 12 ------- docs/src/content/docs/guides/why.mdx | 23 ++++++++++++ docs/src/content/docs/index.mdx | 2 +- 6 files changed, 27 insertions(+), 55 deletions(-) delete mode 100644 .build.yml delete mode 100644 docs/src/content/docs/guides/why.md create mode 100644 docs/src/content/docs/guides/why.mdx diff --git a/.build.yml b/.build.yml deleted file mode 100644 index 563edbe..0000000 --- a/.build.yml +++ /dev/null @@ -1,35 +0,0 @@ -image: alpine/edge -packages: - - nodejs - - npm - - pnpm -secrets: - - 34883663-8684-41cb-9920-8e96345ef166 - - bbfcb6dc-7c4a-42ee-a11a-022f0339a133 -environment: - NETLIFY_SITE_ID: bfd69adf-f754-433c-9690-63426f0d2fa0 - GH_USER: ayoayco - REPO: wcb -tasks: - - push-mirror: | - cd ~/"${REPO}" - git config --global credential.helper store - git push --mirror "https://github.com/${GH_USER}/${REPO}" - - install-deps: | - cd ~/"${REPO}" - pnpm i --ignore-scripts - - test: | - cd ~/"${REPO}" - npx vitest run - - build: | - cd ~/"${REPO}" - pnpm -F docs build - - deploy: | - cd wcb - { - set +x - . ~/.buildsecrets - set -x - } - export NETLIFY_AUTH_TOKEN - pnpm -F docs run deploy diff --git a/README.md b/README.md index 6a25b4d..9ebb8b3 100644 --- a/README.md +++ b/README.md @@ -13,8 +13,6 @@ When you extend the `WebComponent` class for your component, you only have to de The result is a reactive UI on property changes. -There's a trade off between productivity & lightweight-ness here, and it is somewhere between [Microsoft's FASTElement](https://github.com/microsoft/fast) & [Google's LitElement](https://github.com/lit/lit/). - ## Links - [Documentation](https://webcomponent.io) @@ -28,7 +26,7 @@ There are many ways to get in touch: 1. Open a [GitHub issue](https://github.com/ayoayco/wcb/issues/new) or [discussion](https://github.com/ayoayco/wcb/discussions) 1. Submit a ticket via [SourceHut todo](https://todo.sr.ht/~ayoayco/wcb) 1. Email me: [ayo@ayco.io](mailto:ayo@ayco.io) -1. Join Discord: [Ayo's Projects](https://discord.gg/kkvW7GYNAp) +1. Chat on Discord: [Ayo's Projects](https://discord.gg/kkvW7GYNAp) ## Inspirations and thanks @@ -38,4 +36,4 @@ There are many ways to get in touch: --- *Just keep building.*
-*A project by [Ayo Ayco](https://ayo.ayco.io)* \ No newline at end of file +*A project by [Ayo Ayco](https://ayo.ayco.io)* diff --git a/docs/src/content/docs/guides/getting-started.mdx b/docs/src/content/docs/guides/getting-started.mdx index 98d3b80..a763de5 100644 --- a/docs/src/content/docs/guides/getting-started.mdx +++ b/docs/src/content/docs/guides/getting-started.mdx @@ -28,9 +28,7 @@ If you have some complex needs, we recommend using the `WebComponent` base class ## Installation -The library is distributed as complete ECMAScript Modules (ESM) and published on [NPM](https://ayco.io/n/web-component-base). Please -email a ticket at [~ayoayco/wcb@todo.sr.ht](mailto:~ayoayco/wcb@todo.sr.ht) or submit via [SourceHut todo](https://todo.sr.ht/~ayoayco/wcb) -for problems or requests regarding our distribution. You can also start a [GitHub discussion](https://github.com/ayoayco/wcb/discussions). +The library is distributed as complete ECMAScript Modules (ESM) and published on [NPM](https://ayco.io/n/web-component-base). Please open a [GitHub issue](https://github.com/ayoayco/wcb/issues/new) or [discussion](https://github.com/ayoayco/wcb/discussions) for problems or requests regarding our distribution. You can also submit a ticket in [SourceHut](https://todo.sr.ht/~ayoayco/wcb). ### Import via CDN diff --git a/docs/src/content/docs/guides/why.md b/docs/src/content/docs/guides/why.md deleted file mode 100644 index 59f49c9..0000000 --- a/docs/src/content/docs/guides/why.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -title: Why use this base class? -slug: 'why' ---- - -Often times, when simple websites need a quick custom element, the best way is still to create one extending from `HTMLElement`. However, it can quickly reach a point where writing the code from scratch can seem confusing and hard to maintain especially when compared to other projects with more advanced setups. - -Also, when coming from frameworks with an easy declarative coding experience (using templates), the default imperative way (e.g., creating instances of elements, manually attaching event handlers, and other DOM manipulations) is a frequent pain point we see. - -This project aims to address these with virtually zero tooling required and thin abstractions from vanilla custom element APIs – giving you only the bare minimum code to be productive. - -It works on current-day browsers without needing compilers, transpilers, or polyfills. diff --git a/docs/src/content/docs/guides/why.mdx b/docs/src/content/docs/guides/why.mdx new file mode 100644 index 0000000..f570d74 --- /dev/null +++ b/docs/src/content/docs/guides/why.mdx @@ -0,0 +1,23 @@ +--- +title: Why use this base class? +slug: 'why' +--- + +import { Aside, Badge } from '@astrojs/starlight/components'; + +Often times, when simple websites need a quick custom element, the simplest way is to create one extending from `HTMLElement`. However, it can quickly reach a point where writing the code from scratch can seem confusing and hard to maintain especially when compared to other projects with more advanced setups. + +Also, when coming from frameworks with an easy declarative coding experience (using templates), the default imperative way (e.g., creating instances of elements, manually attaching event handlers, and other DOM manipulations) is a frequent pain point we see. + +By taking out bigger concerns that [a metaframework](https://github.com/ayoayco/mcfly) should handle, this project aims to focus on keeping the component-level matters simple and lightweight. This allows for addressing the said problems with virtually zero tooling required and thin abstractions from vanilla custom element APIs – giving you only the bare minimum code to be productive. + +It works on current-day browsers without needing compilers, transpilers, or polyfills. + + \ No newline at end of file diff --git a/docs/src/content/docs/index.mdx b/docs/src/content/docs/index.mdx index 31bba00..37113b7 100644 --- a/docs/src/content/docs/index.mdx +++ b/docs/src/content/docs/index.mdx @@ -10,7 +10,7 @@ hero: - text: Get Started link: /getting-started icon: right-arrow - - text: Play on CodePen + - text: Try on CodePen link: https://codepen.io/ayoayco-the-styleful/pen/PoVegBK?editors=1010 icon: external variant: minimal