Zjs/README.md

85 lines
3.0 KiB
Markdown
Raw Normal View History

2025-04-06 05:59:42 +00:00
# ZeroJS
2025-04-06 05:25:00 +00:00
2025-04-06 05:59:42 +00:00
# Overview
Welcome to Zjs, an exciting collection of lovingly crafted web components
carelessly extracted from my proprietary codebase and hurled at an
unsuspecting public.
Zjs stands for *"ZeroJS"*, which doesnt mean *"no JavaScript"* (that would be
silly), but rather *"Just the necessary JS so you can avoid duct-taping React
to your website just to show a modal"*.
This is not a framework. There is no CLI. There is no NPM command. You dont
need to install 12 packages and a plugin just to say "hello". You can't do
that anyway even if you wanted to; there's no build step to spend billable
hours on.
You include a script and it works. It's wild, I know.
Currently, this repo contains exactly one thing: ZjsComponent. Youll find it
in its own folder, with its own README. That README has the real
documentation. This one is just for vibes.
## Philosophy
I like my deliverables like I like my cars: small, fast and easy to work on.
Zjs is for me. I want to write HTML and sprinkle in functionality without
loading the entire front-end industrial complex. I write tags, the components
do their thing and I get to spend time with my kids.
If you identify with the above self-description of my goals, then you'd
probably want to read the individual READMEs for each web component in here.
I'd advise moving on to a different library if your life is incomplete without
`$FRAMEWORK`, or your identity as a web developer is tied to NPM, or if you
are allergic to self-contained, easily debugged and above all **tiny** code
packages.
## Installing
Clone it like its 2009:
2025-04-06 07:01:31 +00:00
git clone https://code.lelanthran.com/lelanthran/Zjs
2025-04-06 05:59:42 +00:00
Then copy what you need and use it however you like. No bundling. No
compiling. No YAML. No weirdness. Just HTML and a `<script>` tag.
## Contributing
The contribution rules are possibly the easiest you've ever seen: **Just
Don't!**
Why? Because the restrictions for contributors are overwhelmingly onerous and
anyone willing to run the gauntlet below belong to such a small subset of
humanity they should really be skeptical of their own identity as a
non-machine.
#### Contributor Restrictions
2025-04-06 07:01:31 +00:00
**I WILL NOT** *accept anything* (Logical `OR` The following items):
2025-04-06 05:59:42 +00:00
- ... That requires NPM, Python or some other non-ubiquitous runtime.
- ... With a dependency.
- ... That requires a build-step.
- ... That can't be used from direct HTML.
- ... Without a nice visual test page.
- ... That has nothing to do with the code (one would think that this one is
obvious, but then one would be in for a surprise).
2025-04-06 07:01:31 +00:00
**I WILL** *accept* (Logical `AND` the following items):
2025-04-06 05:59:42 +00:00
- ... Web Components prefixed with `Zjs`/`zjs-`,
- ... That have no build-step,
- ... That have no runtime dependencies other than the browser and Javascript,
2025-04-06 07:01:31 +00:00
- ... That solve a widespread problem.
- ... Bugfixes.
2025-04-06 05:59:42 +00:00
At some point I'll add in some way to automate the testing a little; it's
doubtful that the testing process will remain dependency-free, but we'll see.
## License
MIT. This means that when it breaks you get to keep *all* the pieces.
Good luck.