0.3.0 • Published 2 years ago

coook v0.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years ago

Coook

A forward-thinking library of web components.

  • Works with all frameworks 🧩
  • Works with CDNs 🚛
  • Fully customizable with CSS 🎨
  • Includes an official dark theme 🌛
  • Built with accessibility in mind ♿️
  • Open source 😸

Designed by Donux, inspired by Shoelace


What are you using to build Coook?

Components are built with LitElement, a custom elements base class that provides an intuitive API and reactive data binding. The build is a custom script with bundling powered by esbuild.

Developing

Once you've cloned the repo, run the following command.

npm start

This will spin up the Coook dev server. After the initial build, a browser will open automatically. There is currently no hot module reloading (HMR), as browser's don't provide a way to reregister custom elements, but most changes to the source will reload the browser automatically.

The documentation is powered by Docsify, which uses raw markdown files to generate pages. As such, no static files are built for the docs.

Building

To generate a production build, run the following command.

npm run build

Creating New Components

To scaffold a new component, run the following command, replacing ck-tag-name with the desired tag name.

npm run create ck-tag-name

This will generate a source file, a stylesheet, and a docs page for you. When you start the dev server, you'll find the new component in the "Components" section of the sidebar.