Skip to content

Commit

Permalink
cdn distribution should work
Browse files Browse the repository at this point in the history
  • Loading branch information
era-epoch committed Oct 4, 2024
1 parent 30279a8 commit 8d0c8aa
Show file tree
Hide file tree
Showing 6 changed files with 666 additions and 214 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ via npm

via unpkg cdn

`<script src="https://unpkg.com/animautomata@latest/dist/min.js></script>`
`<script src="https://unpkg.com/animautomata@latest/dist/min.js"></script>`

via jsdeliver cdn

Expand Down
2 changes: 1 addition & 1 deletion dist/docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="x-ua-compatible" content="IE=edge" />
<link rel="icon" type="image/png" href="/animautomata/img/logo-512.png" />
<link rel="icon" type="image/png" href="/img/logo-512.png" />
<title>docs</title>
<meta name="description" content="Documentation for animautomata" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
Expand Down
2 changes: 1 addition & 1 deletion dist/min.js

Large diffs are not rendered by default.

18 changes: 8 additions & 10 deletions index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
import { Antiquum, Lemniscate, Sempiternal } from "./src";

try {
new Antiquum("");
new Lemniscate("");
new Sempiternal("");
} catch (e) {
console.log("If you know a better way to not do this please let me know");
}

// Not sure this is the best way to get vite to actually output the source code to ./dist
// But it works?
// Not sure if this is the ideal way to do this?
console.log("Loading animautomata library.");
// @ts-expect-error
window.Antiquum = Antiquum;
// @ts-expect-error
window.Lemniscate = Lemniscate;
// @ts-expect-error
window.Sempiternal = Sempiternal;
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "animautomata",
"version": "1.0.4",
"version": "1.0.5",
"description": "a library for creating high quality loading animations using the Canvas API",
"main": "src/index.ts",
"type": "module",
"scripts": {
"dev": "vite",
"test": "jest",
"build": "npm run docs && vite build && vite build --mode examples",
"build": "vite build && vite build --mode examples",
"preview": "vite preview",
"docs": "typedoc src/index.ts --plugin typedoc-material-theme --themeColor '#c70039' --out public/docs"
},
Expand Down
852 changes: 653 additions & 199 deletions public/docs/index.html

Large diffs are not rendered by default.

0 comments on commit 8d0c8aa

Please sign in to comment.