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

@gondel/core

v1.2.8

Published

The base core of the gondel library

Downloads

2,813

Readme

NPM version Build Status Size License Commitizen friendly Prettier

🚡 Gondel

Gondel is a tiny (3kb) non-intrusive library to help you modularize your code.
It does not ship with a rendering engine to be a perfect fit for most client side rendering engines (e.g. React or Angular) and server side rendering engines (e.g. Java or PHP)

Installation

npm i @gondel/core

Hello World

This button will listen to all click events events coming from all elements with data-g-name="Button" and will show an alert message.

HTML

 <button data-g-name="Button">Click me</button>

 <button data-g-name="Button">Or click me</button>

JS

import {Component, EventListener, GondelBaseComponent} from '@gondel/core';

// The @Component decorator will connect the class with `data-g-name="Button"` elements.
@Component('Button')
export class Button extends GondelBaseComponent {
  @EventListener('click') 
  _handleChange(event) {
    alert('Hello World')
  }
}

Hello World Example

Module format

Gondel follows the rollup recommendations which includes on the one hand ESM for bundle size optimisations and on the other hand a UMD version to be compatible with every former javascript bundling/concatenation strategy.

Gondel is fully typed and exports optional typescript declaration files for typescript projects.

Plugins

  • Data Plugin - Provide auto binding of data attributes - Demo
  • Hot Plugin - Adds support for hot-module-reloading (hmr) for Gondel components. - Demo
  • jQuery Plugin - Adds support for easy access to the current ctx as jQuery collection.
  • Media Queries Plugin - Provide a custom gondel event which will fire once a given media query is met - Demo
  • React Plugin - Adds support to bootstrap React widgets and apps using Gondel and vice versa - Demo
  • Resize Plugin - Provides an event when the window or the component resized - Demo

Playground

https://codesandbox.io/s/github/merkle-open/gondel/tree/master/examples/hello-world

Examples

Contributing to Gondel

All contributions are welcome: use-cases, documentation, code, patches, bug reports, feature requests, etc.
The following commands will get you started to work locally:

npm install
npm run build

Running tests:

npm run test:watch

Thanks to all who have contributed (emoji key) so far:

| Jan Nicklas💻 📖 🐛 💡 🚇 🔌 ⚠️ 👀 | Ernst Ammann💻 📖 🚇 📦 👀 | Dušan Perković💻 📖 🔌 🤔 ⚠️ | Jan R. Biasi💻 📖 🤔 ⚠️ 👀 | Jan Widmer💻 📖 💡 🤔 🔌 | Claudio Bianucci💻 🤔 | | :---: | :---: | :---: | :---: | :---: | :---: |

License

MIT license