npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bemtv

v0.9.0

Published

Declarative and flexible UI library: Template-based reactivity, automatic routes/pages and SuperComponents.

Downloads

4

Readme

Translations:

Why Bemtv?

Currently in the Javascript ecosystem there are excellent tools for developing the user interface. Bemtv reuses much of what these tools brought and brings, however, it is not a copy, it is something totally new.

IMPORTANT: Bemtv is a recent project that is improving every day and seeking stability, read the releases to stay informed of what has changed.

Don't forget to give your star to the project, as this encourages me to continue developing.

Key Features

  • Cleaner syntax than other UI libraries and frameworks.

  • No “props”. A new way for parent component to pass data to child components.

  • Instead of a common routing system or based on files, Bemtv brings a new innovative routing system that is capable of “transforming” a component into a route automatically according to its use in the application.

  • Separation of logic related to DOM events from the component template.

  • Semi-automatic Code-Splitting.

  • CSS-In-JS and CSS-In-Template.

  • The design of the components allows the export of all the methods belonging to it, which allows the use of these methods in any part of the application.

  • Easy two-way binding between component variables and HTML element properties and attributes.

  • Hooks.

  • Transform functions that separate data structures like Array, Set, Map and Object from their markup for the template.

  • Brackethtml markup language: instead of <div>Hey!</div> do this: div[Hey!].

  • Declarative syntactic sugars through the component template.

  • It's just Javascript, no JSX or build-time needed, just add it to your index.html and have fun!

Show me some code!

All component methods can be exported and used in other parts of the application:

import { _ } from "bemtv";

export const { click$, onMount, route, css, template } = _`Home`();

This allows you to separate the component logic into several functions that can use the component's lifecycle, state, manipulate DOM elements, styling, routing, DOM events...

Adding CSS and DOM events:

import { _ } from "bemtv";

export const { click$, css, template } = _`Button`();

click$(() => console.log("Clicked!!!"));

css`
  color: blue;
`;

template`button[ I am a button! ]`;

Bind element's DOM property with component's:

import { _ } from "bemtv";

const { $, template } = _`Input`({
  inputValue: 0,
});

template`input[type="number" $inputValue<value]`;

Show a fallback while the component is being imported:

import { _ } from "bemtv";

const { template } = _`App`();

template`UserData[](Loading...)`;

Creating a route link:

import { _ } from "bemtv";

const { template } = _`App`();

template`#AboutUs[ Link to about us ]`;

Bemtv uses an innovative automatic route creation system, this is possible because the components can behave like routes/pages.

Counter component:

import { _ } from "bemtv";

export const { click$, $, template } = _`Counter`({ count: 0 });

click$(() => $.count++);

template`button[Clicked: $count ]`;

This is just the tip of the iceberg, many of Bemtv's features really show their power with practice and when combined with others!

What's next

Bemtv is a recent and little-known project, I have several ideas to continue the development of it and other projects around it, such as a syntax highlighting extension.

I currently work full time at Bemtv and do not receive any financial compensation, if you like Bemtv please consider supporting the project, your help will determine if the project can continue to reach greater heights.

If you have some free time, come and be part of building Bemtv!

All help is appreciated!