https://github.com/walkingriver/drawing-pad-stencil
A custom web component written with StencilJS for providing a drawing widget for PWAs or mobile hybrid apps.
https://github.com/walkingriver/drawing-pad-stencil
Last synced: over 1 year ago
JSON representation
A custom web component written with StencilJS for providing a drawing widget for PWAs or mobile hybrid apps.
- Host: GitHub
- URL: https://github.com/walkingriver/drawing-pad-stencil
- Owner: walkingriver
- License: mit
- Created: 2018-08-30T17:32:37.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-30T17:51:09.000Z (almost 8 years ago)
- Last Synced: 2025-01-19T07:13:29.336Z (over 1 year ago)
- Language: TypeScript
- Size: 61.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README

# WalkingRiver Drawing Pad
This is a small a standalone Web Component for drawing on an HTML5 canvas, for PWAs or hybrid web apps, using Stencil.
Stencil is also great for building entire apps. For that, use the [stencil-app-starter](https://github.com/ionic-team/stencil-app-starter) instead.
## Getting Started
To see this component in action, clone this repository, and then...
and run:
```bash
cd drawing-pad-stencil
npm install
npm start
```
To build the component for production, run:
```bash
npm run build
```
To run the unit tests for the components, run:
```bash
npm test
```
# Stencil Info Below
Need help? Check out our docs [here](https://stenciljs.com/docs/my-first-component).
# 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.
## Naming Components
When creating new component tags, we recommend _not_ using `stencil` in the component name (ex: ``). This is because the generated component has little to nothing to do with Stencil; it's just a web component!
Instead, use a prefix that fits your company or any name for a group of related components. For example, all of the Ionic generated web components use the prefix `ion`.
## Using this component
### Script tag
- [Publish to NPM](https://docs.npmjs.com/getting-started/publishing-npm-packages)
- Put a script tag similar to this `` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc
### Node Modules
- Run `npm install my-component --save`
- Put a script tag similar to this `` in the head of your index.html
- Then you can use the element anywhere in your template, JSX, html etc
### In a stencil-starter app
- Run `npm install my-component --save`
- Add an import to the npm packages `import my-component;`
- Then you can use the element anywhere in your template, JSX, html etc