0.0.3 • Published 11 months ago

up-down-counter v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
11 months ago

up-down-counter

NPM version How big is this package in your project?

This is the famous counter test example for web components.

Note that the "run time" files for this web component are all html based. There are, however, some JS dependencies, due primarily to lack of love shown by the WHATWG towards end users.

However, to benefit from the tooling that JS provides, a few extra hops are supported, that splits the html file into two (a bundling step could combine them back into one, which would benefit initial load, but could hurt fine-grain caching).

The Typescript-safe definition for the binding is maintained in file root.mjs, which generates the html file which is designed as the distributed file reference for the web component.

To build the html file as you edit the mjs file, run:

npm run watch

to output to def.html.

Viewing up-down-counter locally

Any web server that can serve static files will do, but...

  1. Install git.
  2. Fork/clone this repo.
  3. Install node.js
  4. Open command window to folder where you cloned this repo.
  5. npm install

  6. npm run serve

  7. Open http://localhost:3030/demo/dev.html in a modern browser.
0.0.1

1 year ago

0.0.3

11 months ago

0.0.2

1 year ago

0.0.0

1 year ago