Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/keenlycode/deficon

SVG Definitions to Icon Component for Web Application
https://github.com/keenlycode/deficon

component icon svg webapp

Last synced: 27 days ago
JSON representation

SVG Definitions to Icon Component for Web Application

Awesome Lists containing this project

README

        

# DefIcon - 2.0.x

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

## Usage
> **SVG Definitions to Icon Component for Web Application**

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

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

customElements.define('el-icon', Icon);
```

```html

```

### Using Mixin

Mixin is more flexible and can extends other `HTMLElement` Component.
```js
// Javascript
import { DefIconMixin } from '@devcapsule/deficon';

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

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

## Development

### Environment Required
- NodeJS
- Python

### Run Test
```shell
npm run test
```
Test in watch mode
```shell
npm run test-watch
```

### Build documentation
```shell
npm run docs
```

### Build distribution files
```shell
npm run dist
```