Skip to content

Instantly share code, notes, and snippets.

View arei's full-sized avatar

Glen R. Goodwin arei

View GitHub Profile
@arei
arei / 10ThingsWrongWebComponents.md
Last active February 20, 2024 03:16
10 Things You Are Doing Wrong in your Web Components

10 Things You Are Doing Wrong in your Web Components

Web Components enable custom element creation and sharing on a whole new level that has not really been seen to date but is so desperately needed. Developers of everything from simple webpages to complex applications are using Web Components to deliver new functionality, new behaviors, and new designs. Web Components are a big part of the future of the web.

There are lots of articles detailing how to build a basic Web Component, but almost no article details how to solve some of the gotchas once you start down that road. That's what this article serves to do; point out some of the things every Web Component developer is overlooking and to which they should probably be giving more consideration.

1). Not Using a Web Component Framework

The APIs which make up the Web Components standards (Custom Elements, ShadowDOM, etc) are intentionally low level APIs. As such they are not always the most clear or concise in their understandability. Additionally,

@arei
arei / IntroZephJS.md
Last active June 26, 2020 01:15
Introducing ZephJS!

Introducing ZephJS

We are pleased to announce the release of ZephJS!

ZephJS is an extremely easy to use, simple to understand, ultra-light framework for defining and using Web Components. ZephJS is perfect for people writing component libraries, teams building applications or sites that just require a few custom components, or projects building whole applications that do not want the gigantic weight of a modern JavaScript browser framework. ZephJS simplifies the process of defining custom Web Components into a highly readable declarative structure that uses standard JavaScript, standard HTML markup, and standard CSS styling. And ZephJS weighs in at less than 20k minified!

Here's an example of using ZephJS to build a customized button:

my-button.js

Keybase proof

I hereby claim:

  • I am arei on github.
  • I am arei (https://keybase.io/arei) on keybase.
  • I have a public key whose fingerprint is 72AE EEB0 BF9C C09D A82A 3372 661A CA7A 4FA5 B582

To claim this, I am signing this object:

@arei
arei / gist:5610362
Created May 20, 2013 04:03
Describes the npm offline/disconnected install problem and how npmbox is trying to solve it.
I believe I have failed to state my case clearly, so here is the scenario with which I am faced...
Imagine two networks: NETWORK A and NETWORK B.
NETWORK A is a traditional on the Internet network we all use every day. There are no limitations to what we can do on machines connected to NETWORK A.
NETWORK B is a completely disconnected and isolated network that is not on the Internet and can never be connected to the Internet. Ever.
The only way to move data between A and B is by physical media and sneakernet.