qr-code-stencil-component v0.0.3
Stencil QRCode Component
This is a web-component made using stencil component starter.
The purpose is to test a component exposing a third-party library to create its contents.
Stencil
Stencil is a compiler for building fast web apps using Web Components.
Stencil combines the best concepts of the most popular frontend frameworks into a compile-time rather than run-time tool. Stencil takes TypeScript, JSX, a tiny virtual DOM layer, efficient one-way data binding, an asynchronous rendering pipeline (similar to React Fiber), and lazy-loading out of the box, and generates 100% standards-based Web Components that run in any browser supporting the Custom Elements v1 spec.
Stencil components are just Web Components, so they work in any major framework or with no framework at all.
Getting Started
To test or contribute to this project, clone this repo to a new directory:
git clone https://github.com/doppelganger9/stencil-qrcode-component.git
cd stencil-qrcode-component
and run:
npm install
npm start
To watch for file changes during develop, run:
npm run dev
To build the component for production, run:
npm run build
To run the unit tests for the components, run:
npm test
Need help? Check out Stencil docs here.
To update & publish on your project's GitHub Pages, run:
npm run prepare
npm run publish-docs
QR Code library
This project uses qrcode-generator to generate the image (dataURI, SVG or Table) of the QR Code.
GitHub Pages
See the live demo GitHub Pages.
Big thanks to Samuel Mortenson (@mortenson) and its Ame Components for automating the Github Page publishing!
There is now a Gist.
PWA
The GitHub Page is a PWA.
LightHouse score is:
- PWA: 100
- Performance: 100
- Accessibility: 87
- Best Practices: 100
- SEO: 100
License
6 years ago