@ebolax/animated-icons 1.0.1 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +76 -6
- package/dist/animated-icons.bundle.min.css +1 -0
- package/dist/animated-icons.min.css +1 -1
- package/dist/index.html +32 -4
- package/package.json +10 -5
package/dist/index.html
CHANGED
|
@@ -19091,9 +19091,37 @@
|
|
|
19091
19091
|
|
|
19092
19092
|
<section class="wrapper-docs mt-5 mb-5 rounded">
|
|
19093
19093
|
<h2 class="section-title">Install from npm</h2>
|
|
19094
|
-
<p class="section-meta mb-
|
|
19095
|
-
<pre><code>npm i @ebolax/animated-icons</code></pre>
|
|
19096
|
-
<p class="section-meta mb-
|
|
19094
|
+
<p class="section-meta mb-2">You can install this package from <a href="https://www.npmjs.com/package/@ebolax/animated-icons" target="_blank" rel="noopener noreferrer">npm</a> and use the built CSS and icons in your project.</p>
|
|
19095
|
+
<pre class="mb-2"><code>npm i @ebolax/animated-icons</code></pre>
|
|
19096
|
+
<p class="section-meta mb-2">After installing, link the stylesheet from <code>node_modules/ebolax-animated-icons/dist/animated-icons.css</code> (or the minified <code>animated-icons.min.css</code>) and use the icon classes as shown below.</p>
|
|
19097
|
+
<pre class="mb-2"><code><link rel="stylesheet" href="/path/to/animated-icons.min.css"></code></pre>
|
|
19098
|
+
<p class="section-meta mb-2">
|
|
19099
|
+
For the simplest setup, you can use the bundled <code>animated-icons.bundle.min.css</code> file, which includes all icons as embedded assets.
|
|
19100
|
+
<br>
|
|
19101
|
+
<strong>This means you do <u>not</u> need to copy or serve the <code>aic-icons</code> folder separately.</strong>
|
|
19102
|
+
</p>
|
|
19103
|
+
<pre class="mb-2"><code><link rel="stylesheet" href="/path/to/animated-icons.bundle.min.css"></code></pre>
|
|
19104
|
+
<p class="section-meta mb-2">
|
|
19105
|
+
You can also import the CSS file directly into your JavaScript or TypeScript project using <code>import</code> or <code>require</code>:
|
|
19106
|
+
</p>
|
|
19107
|
+
<pre class="mb-2"><code>import "@ebolax/animated-icons";</code></pre>
|
|
19108
|
+
<p class="section-meta mb-2">
|
|
19109
|
+
Or, for CommonJS projects:
|
|
19110
|
+
</p>
|
|
19111
|
+
<pre class="mb-2"><code>require("@ebolax/animated-icons");</code></pre>
|
|
19112
|
+
</section>
|
|
19113
|
+
|
|
19114
|
+
<section class="wrapper-docs mt-5 mb-5 rounded">
|
|
19115
|
+
<h2 class="section-title">Basic usage</h2>
|
|
19116
|
+
<p class="section-meta mb-3">Basic usage: Just add an <code>i</code> tag with the <code>aic</code> class and the icon's class name. For example:</p>
|
|
19117
|
+
<pre><code><!-- Heroicons -->
|
|
19118
|
+
<i class="aic aic-hero-academic-cap"></i>
|
|
19119
|
+
|
|
19120
|
+
<!-- Iconoir -->
|
|
19121
|
+
<i class="aic aic-io-mail"></i>
|
|
19122
|
+
|
|
19123
|
+
<!-- Lucide -->
|
|
19124
|
+
<i class="aic aic-luc-home"></i></code></pre>
|
|
19097
19125
|
</section>
|
|
19098
19126
|
|
|
19099
19127
|
<section class="wrapper-docs mt-5 mb-5 rounded">
|
|
@@ -19105,7 +19133,7 @@
|
|
|
19105
19133
|
</section>
|
|
19106
19134
|
|
|
19107
19135
|
<section class="wrapper-docs mt-5 mb-5 rounded">
|
|
19108
|
-
<h2 class="section-title">
|
|
19136
|
+
<h2 class="section-title">Change the animation</h2>
|
|
19109
19137
|
<p class="section-meta mb-3">You can change the animation by adding the <code>--aic-animation style variable</code> attribute to the icon. The value is the name of the animation. For example, to change the animation to <code>bar</code>, you can add the <code>style="--aic-animation: aic-bar;"</code> attribute to the icon.</p>
|
|
19110
19138
|
<pre><code id="animation-demo-code"><i class="aic aic-hero-arrow-path" style="--aic-animation: aic-bar;"></i></code></pre>
|
|
19111
19139
|
<h6 class="mt-2">DEMO</h6>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ebolax/animated-icons",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "CSS-only animated icons for Lucide, Heroicons and Iconoir",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -22,11 +22,15 @@
|
|
|
22
22
|
],
|
|
23
23
|
"scripts": {
|
|
24
24
|
"prepublishOnly": "npm run build",
|
|
25
|
-
"
|
|
25
|
+
"esbuild_bundle": "esbuild dist/animated-icons.css --bundle --outfile=dist/animated-icons.bundle.min.css --minify --loader:.svg=dataurl",
|
|
26
|
+
"esbuild_minify": "esbuild dist/animated-icons.css --outfile=dist/animated-icons.min.css --minify",
|
|
27
|
+
"build": "node build-css-icons.mjs && npm run esbuild_bundle && npm run esbuild_minify",
|
|
26
28
|
"serve": "serve dist",
|
|
27
29
|
"start": "npm run build && npm run serve",
|
|
28
30
|
"nodemon": "nodemon --watch base.css --watch index.ejs --watch build-css-icons.mjs --exec \"npm run build\"",
|
|
29
|
-
"dev": "npm-run-all --parallel nodemon serve"
|
|
31
|
+
"dev": "npm-run-all --parallel nodemon serve",
|
|
32
|
+
"git_update": "git add . && git commit -m 'Update' && git push origin main",
|
|
33
|
+
"npm_update": "npm version patch && npm publish"
|
|
30
34
|
},
|
|
31
35
|
"author": "ebolax",
|
|
32
36
|
"license": "ISC",
|
|
@@ -36,13 +40,14 @@
|
|
|
36
40
|
],
|
|
37
41
|
"exports": {
|
|
38
42
|
".": {
|
|
39
|
-
"import": "./dist/animated-icons.min.css",
|
|
40
|
-
"require": "./dist/animated-icons.min.css"
|
|
43
|
+
"import": "./dist/animated-icons.bundle.min.css",
|
|
44
|
+
"require": "./dist/animated-icons.bundle.min.css"
|
|
41
45
|
}
|
|
42
46
|
},
|
|
43
47
|
"devDependencies": {
|
|
44
48
|
"@eslint/js": "^10.0.1",
|
|
45
49
|
"ejs": "^5.0.1",
|
|
50
|
+
"esbuild": "^0.27.3",
|
|
46
51
|
"eslint": "^10.0.3",
|
|
47
52
|
"globals": "^17.4.0",
|
|
48
53
|
"heroicons": "^2.2.0",
|