@iaux/icon
v0.0.7
Published
Lit WebComponent small SVG based archive.org icons.
Downloads
36
Readme
IA Icons
Lit WebComponent small SVG based archive.org icons.
This repo builds JS sources, tests, and test pages, from a subdirectory of svg files:
Importing
Each .svg source file can then be individually imported via JS/TS like:
import twitter from 'https://esm.archive.org/@iaux/icon/twitter'You can use in markup with the lit / web components definition like:
<ia-icon-video></ia-icon-video>
<script type="module" src="https://esm.archive.org/@iaux/icon/video"></script>Each icon .js file defines an <ia-icon> LitElement web component.
You can also import all icons at once like:
import { share, twitter } from 'https://esm.archive.org/@iaux/icon'-OR-
<ia-icon-video></ia-icon-video>
<script type="module" src="https://esm.archive.org/@iaux/icon"></script>Demo Pages
Updating
Please run:
./bin/build.shin a git clone of this repo to rebuild/update src/ and test/ files.
You can add a new (or change an existing) .svg file in the svg/ subdir.
Running the bin/build.sh script will automatically create (or update) the relevant JS and test files.
Publishing
When ready to publish an update, cd to this directory and:
npm version patch
npm run prepubish
# make sure all runs ok
npm publish
# you should git commit & push package.json and anything else now