Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/keenlycode/deficon
- Owner: keenlycode
- License: mit
- Created: 2022-03-03T15:35:12.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-14T08:37:17.000Z (about 1 year ago)
- Last Synced: 2024-11-09T10:48:35.803Z (about 2 months ago)
- Topics: component, icon, svg, webapp
- Language: TypeScript
- Homepage: https://keenlycode.github.io/deficon/
- Size: 1.22 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license.md
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
```