2.0.2 • Published 2 years ago

@devcapsule/deficon v2.0.2

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

DefIcon - 2.0.x

Website

https://keenlycode.github.io/deficon/

Usage

SVG Definitions to Icon Component for Web Application

// Javascript
import { DefIcon } from '@devcapsule/deficon';

class Icon extends DefIcon({
    url: './icon.svg'}) {};

customElements.define('el-icon', Icon);
<!-- html -->
<el-icon name="audio-speakers"></el-icon>

Using Mixin

Mixin is more flexible and can extends other HTMLElement Component.

// Javascript
import { DefIconMixin } from '@devcapsule/deficon';

class Icon extends DefIconMixin({url: './icon.svg'}, HTMLElement) {};

// The rest is the same.
customElements.define('el-icon', Icon);
// ...

Development

Environment Required

  • NodeJS
  • Python

Run Test

npm run test

Test in watch mode

npm run test-watch

Build documentation

npm run docs

Build distribution files

npm run dist
2.0.2

2 years ago

2.0.0-dev

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago