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

mdu.js

v0.0.72

Published

Lightweight, easy-to-learn Web Component JavaScript framework

Downloads

179

Readme

Modulo

Modulo is a lightweight framework for creating HTML Web Components: Reusable snippets of HTML, CSS, and JavaScript that create new HTML-like tags that can be used and reused anywhere on your site. Modulo runs entirely in the browser, and can be incorporated with just a couple lines of code into any HTML file (see the "Quick start"), such that no terminal usage is necessary. However, if you prefer, you can also start projects using NPM from the Terminal (see the "NPM start").

  • Beginner-friendly features inspired by React, Svelte, and Vue.js, in only 2000 lines of dependency-free, self-building JavaScript. A “no fuss” drop-in for existing web apps or Jamstack static sites.

  • Try interactive demos and learn more on the website: https://modulojs.org/

Project Status: alpha (Well-documented with lots of examples, but still a work in progress -- help by trying it out!)


Quick start

  1. Include in any HTML file the single Modulo JavaScript file loaded from a CDN:
<script src="https://unpkg.com/mdu.js"></script>
  1. Now define one or more Modulo web components (custom HTML elements). First, use <template Modulo> and </template> to mark where in your HTML you are defining our components. Then, add "Template", "Script", and "Style" tags, to incorporate HTML, JavaScript, and CSS respectively into your component. E.g.:
<template Modulo>
    <Component name="HelloWorld">
        <Template>
            Hello <strong>Modulo</strong> World!
        </Template>
        <Script>
            console.log('Hello Modulo JS world!');
        </Script>
        <Style>
            strong { color: purple; }
        </Style>
    </Component>
</template>
<script src="https://unpkg.com/mdu.js"></script>
  1. Now, you can use and reuse this new custom element wherever you want, just like any normal HTML tag. E.g.:
<x-HelloWorld></x-HelloWorld>
<p>In a P tag: <x-HelloWorld></x-HelloWorld></p>
  • (Optional) Download src/Modulo.js (the single 2000-line file that contains all of the framework) to wherever you put JS files for your website (for example, /static/js/Modulo.js)

  • Continue? Want to try more? The official beginner tutorial picks up where this leaves off: Ramping Up with Modulo - Part 1

NPM start

Prefer command-line tools, such as NPM? Run the following, and follow the on-screen commands:

npm init modulo

License

(C) 2023 - Michael Bethencourt LGPLv3