Anvil/components
3
1
Fork
You've already forked components
0
UI components of Anvil
JavaScript 43.4%
Rust 23.2%
CSS 16.9%
Nunjucks 16.5%
André Jaenisch 3e0f177ccf
All checks were successful
ci/woodpecker/pr/reuse Pipeline was successful
ci/woodpecker/pr/prettier Pipeline was successful
ci/woodpecker/pr/askama Pipeline was successful
ci/woodpecker/pr/test Pipeline was successful
ci/woodpecker/pull_request_closed/askama Pipeline was successful
ci/woodpecker/push/askama Pipeline was successful
fix: check against empty icon
Due to licensing I better check against an empty icon.
Signed-off-by: André Jaenisch <andre.jaenisch@posteo.de>
2025年11月07日 13:40:05 +01:00
.woodpecker ci: ensure folder exists 2025年11月07日 13:28:22 +01:00
LICENSES chore: set up REUSE and package.json 2025年10月13日 15:10:51 +02:00
src fix: check against empty icon 2025年11月07日 13:40:05 +01:00
tests refactor: find a common ground 2025年11月07日 12:56:06 +01:00
.gitignore feat: support Askama 2025年11月06日 19:27:08 +01:00
askama.toml feat: support Askama 2025年11月06日 19:27:08 +01:00
Cargo.lock feat: support Askama 2025年11月06日 19:27:08 +01:00
Cargo.toml feat: support Askama 2025年11月06日 19:27:08 +01:00
package-lock.json refactor: find a common ground 2025年11月07日 12:56:06 +01:00
package.json refactor: find a common ground 2025年11月07日 12:56:06 +01:00
prettier.config.json chore: add Prettier for Nunjucks 2025年10月14日 16:07:59 +02:00
README.md docs: add provenance 2025年11月06日 12:37:12 +01:00
REUSE.toml chore: update REUSE.toml 2025年11月07日 13:22:49 +01:00
vite.config.js refactor: find a common ground 2025年11月07日 12:56:06 +01:00
vitest.config.js refactor: allow for inlining 2025年10月27日 15:42:50 +01:00

Anvil components

UI components of Anvil, written in Nunjucks.

Motivation

Jinja2 is a template language that inspired compatible packages in a variety of programming languages. In Node.js that would be Nunjucks. So to have components composed on the server, we are publishing them as Nunjucks partials.

To get an idea of how they would appear rendered Vituum is used. This ensures that Vite can build it, so options like Tauri remain on the table.

Documentation

See Storybook.

Development

A development server can be run via Vite.

npm run dev

Note, that Hot Module Reloading isn't always working properly.

Lint

This projects is using Prettier for formatting and linting.

npm run lint

Test

This project is using Vitest and Playwright for testing in a headless Chromium.

npm run test

Build

This projects is using Vite.

npm run build

Publish

In order to publish a new version to Codeberg, the following steps are required:

  1. Ensure you are building the latest version.
  2. Create a personal access token ({pat}) with the following permissions: 2.1. misc: read 2.2. repository: write 2.3. package: write
  3. Add a configuration (saved to $HOME/.npmrc) to add Codeberg as a registry: npm config set -- '//codeberg.org/api/packages/Anvil/npm/:_authToken' "{pat}"
  4. Publish to Codeberg: npm publish --registry=https://codeberg.org/api/packages/anvil/npm/
  5. Increase the version number in package.json

License

AGPL 3.0 or later. See LICENSE.

Provenance

This software is proudly and fondly written, maintained, used -- and most crucially -- understood by real human beings. While we can't personally attest to the provenance of every line of code ever contributed, the vast majority of the codebase has certainly been developed without the aid of large language models and other stochastic 'intelligence'.

While the license may not guarantee warranty 'of any kind', you can at least use this software in the comforting knowledge that its veracity and coherence is vouched for by sentient intelligence with skin in the game and a reputation to uphold.

Contribution guidelines

We expect contributors to adhere to the ethos of the project.

Source code is not an artifact, an intermediate representation, nor a bothersome annoyance whose creation is to be offloaded to metal and transistors. Source code is a source of truth -- the only source of truth that constitutes this software project -- and it deserves to be understood and curated by the accountable and reasoned mind of a human being.

Please refrain from contributing changes that you have not personally understood and instigated the authorship of. We do not expect perfection, but we do expect you to personally understand your own motivations and decisions.