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

mnemerender

v1.0.0

Published

Imperative component render tool with typescript support

Downloads

4

Readme

Mnemerender

A minimalistic library for defining components and rendering them imperatively. The library tries to take a fully functional approach, and delays the implementation of any state information until the last stage.

Usage

1. Component definition

Create a file for the component. Implement the following functionality in it:

  • Collection type of functions that will be available in the post-render script (For example, SomeComponentActions).
  • Component storage entry type (For example, SomeComponentParams).
  • Function for rendering a component of type MnemeTemplateFunc<...>.
  • CSS production function for a component of type MnemeProduceCSSFunc.
  • A postRender script execution function, of type MnemePostRenderAgnosticFunc<...>.

2. Create a vault

Create a repository description file for the new component. Implement the following functionality in it:

  • The structure of the storage, and the way information is stored. The storage should contain: a collection of records, according to which a set of components will be drawn, the component's gnostic data (of the MnemeComponentGnosticDat<...> type) and a name.
  • Ways to initialize and update storage.
  • A way to get a Storage Controller from a shared state. A store controller (of type MnemeComponentsCollectionContoller<...>) is an abstraction that allows you to wrap any type of store. Rendering of components is implemented through it.

3. Write an application script

Create a file that describes how your application is built and how it works. It must contain:

  • Type describing the entire state of the application (all stores).
  • Initialization of local storages.
  • The logic of building a common css block of the page, based on the css constructors of all components.
  • Application initialization script:
    • Starting data for storages are determined.
    • Gnostic data blocks are created, from component agnostic descriptions made earlier. This is done using the initComponent function, which supplements the component's Agnostic declaration with specific implementations of the actions described earlier for it, and a qury-selector getter function to find blocks where the component will be drawn.
    • Initial render is called.

Examples

  • You can find the source code of the Example in the /ts/test-app folder
  • The compiled code of the example is located in the /acc-test folder

License

MIT

Author

Anatoly "Pantagruel74" Starodubtsev [email protected]