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

zliq

v2.0.1

Published

slim and quick framework in low loc

Downloads

189

Readme

ZLIQ

Dependencies CircleCI version downloads MIT License

Code Climate Test Coverage gzip size size module formats: es, umd

All Contributors Watch on GitHub Star on GitHub

ZLIQ is the intent to create an easy to understand, easy to use web framework. It is based on reactive-streams and reactive-dom-rendering. ZLIQ has few lines of code (~580 November 2017).

Website

Why yet another web framework?

Modern web frameworks got really big (React + Redux 139Kb and Angular 2 + Rx 766Kb, [src]). As a developer I came into the (un)pleasent situation to teach people how these work. But I couldn't really say, as I haven't actually understood each line of code in these beasts. But not only that, they also have a lot of structures I as a developer have to learn to get where I want to go. It feels like learning programming again just to be able to render some data.

ZLIQ tries to be sth simple. Sth that reads in an evening. But that is still so powerful you can just go and display complex UIs with it. Sth that feels more JS less Java.

Still ZLIQ doesn't try to be the next React or Angular! ZLIQ has a decent render speed even up to several hundred simultaneous updates but it's not as fast as Preact. And it on purpose does not solve every problem you will ever have. ZLIQ is a tool to help you create the solution that fits your need.

Quickstart

To play around with ZLIQ fork this repo and start the demo page at localhost:8080:

$ npm start

To use ZLIQ in your project, first install it as an dependency:

$ npm install --save zliq

Then create your app component and add it to the DOM:

import {h, render} from 'zliq';

let app = <div>
        <span>Hello World</span>
    </div>;
render(app, document.querySelector('#app');

ZLIQ includes streams similar to flyd to make state easy to handle:

import {h, render} from 'zliq';

// define a stream of state
let state$ = stream({ clicks: 0 });

// Redux like action
let increment = (state$) => () => {
    state$.patch({ clicks: state$.$('clicks')() + 1 })
};
            
let app = <div>
    // display from state
    <p>Clicks: {state$.$('clicks')}</p>
    // interact with state
    <button onclick={increment(state$)}>Click + 1</button>
</div>;
render(app, document.querySelector('#app');

Make sure your stack converts JSX to Hyperscript syntax. In the ZLIQ project this is achieved with Babel and the transform-h-jsx plugin used in webpack. Alternative you can use Babel in the browser, like I did in the ZLIQ playground.

If you don't want to use JSX you can still write plain Hyperscript:

let app = h('div', null, [
    h('span', null, ["Hello World"])
]);

Dive in

Checkout the Git Page as a live example of a ZLIQ app (the code lives under ./demo). There you will also find a tutorial and more detailed descriptions on ZLIQs parts.

Plugins

There are some plugins available to enhance the zliq experience:

Contributors

Thanks goes to these wonderful people (emoji key):

| Fabian💻 🎨 📖 ⚠️ | Ferit Topcu📖 | | :---: | :---: |

This project follows the all-contributors specification. Contributions of any kind welcome!

Logo based on: http://www.iconsfind.com/2015/11/25/candy-dessert-food-sweet-baby-icon/