Introduce iconoir npm package

Available under https://www.npmjs.com/package/iconoir

Tested with Vite - see https://vitejs.dev/guide/assets.html#importing-asset-as-url

Closes #61
This commit is contained in:
Pascal Jufer 2021-07-05 18:38:43 +02:00
parent b909a29495
commit 830a4c9544
5 changed files with 40 additions and 6 deletions

2
.npmignore Normal file
View file

@ -0,0 +1,2 @@
*
!icons

View file

@ -28,7 +28,19 @@
## Basic Usage ## Basic Usage
You can download any icon of the pack directly from https://iconoir.com or get them from the repository. You can download any icon of the pack directly from https://iconoir.com or get them from this repository.
Additionally, the icons are available via the `iconoir` NPM package:
```bash
yarn add iconoir
# or
npm i iconoir
```
Example usage:
```js
import Iconoir from 'iconoir/icons/iconoir.svg'
```
## React ## React

View file

@ -1,10 +1,28 @@
{ {
"name": "iconoir", "name": "iconoir",
"private": true, "version": "1.0.0",
"description": "A Simple and Definitive Open-Source Icons Library",
"type": "module", "type": "module",
"files": [
"icons"
],
"scripts": { "scripts": {
"build": "node ./bin/build.js" "build": "node ./bin/build.js"
}, },
"repository": {
"type": "git",
"url": "git+https://github.com/lucaburgio/iconoir.git"
},
"keywords": [
"icons",
"svg",
"library"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/lucaburgio/iconoir/issues"
},
"homepage": "https://iconoir.com",
"devDependencies": { "devDependencies": {
"@svgr/cli": "^5.5.0", "@svgr/cli": "^5.5.0",
"execa": "^5.1.1", "execa": "^5.1.1",

View file

@ -18,14 +18,15 @@
"keywords": [ "keywords": [
"icons", "icons",
"svg", "svg",
"library" "library",
"react-native"
], ],
"license": "MIT", "license": "MIT",
"bugs": { "bugs": {
"url": "https://github.com/lucaburgio/iconoir/issues" "url": "https://github.com/lucaburgio/iconoir/issues"
}, },
"sideEffects": false, "sideEffects": false,
"homepage": "https://github.com/lucaburgio/iconoir#readme", "homepage": "https://iconoir.com",
"peerDependencies": { "peerDependencies": {
"react": "^16.8.6 || ^17", "react": "^16.8.6 || ^17",
"react-native": ">=0.50.0", "react-native": ">=0.50.0",

View file

@ -18,14 +18,15 @@
"keywords": [ "keywords": [
"icons", "icons",
"svg", "svg",
"library" "library",
"react"
], ],
"license": "MIT", "license": "MIT",
"bugs": { "bugs": {
"url": "https://github.com/lucaburgio/iconoir/issues" "url": "https://github.com/lucaburgio/iconoir/issues"
}, },
"sideEffects": false, "sideEffects": false,
"homepage": "https://github.com/lucaburgio/iconoir#readme", "homepage": "https://iconoir.com",
"peerDependencies": { "peerDependencies": {
"react": "^16.8.6 || ^17" "react": "^16.8.6 || ^17"
}, },