Skip to content

Commit

Permalink
Remove demo from npm
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Feb 20, 2024
1 parent 12ff273 commit 08a4185
Show file tree
Hide file tree
Showing 12 changed files with 443 additions and 4 deletions.
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
"cross-tab"
],
"scripts": {
"test:build": "vite build ./demo",
"test:lint": "eslint .",
"test:coverage": "c8 pnpm bnt",
"test:types": "check-dts",
"test:size": "size-limit",
"test": "pnpm run /^test:/",
"start": "pnpm run test:build && vite preview ./demo"
"start": "vite ./test/demo"
},
"author": "Andrey Sitnik <andrey@sitnik.ru>",
"license": "MIT",
Expand Down Expand Up @@ -101,7 +100,7 @@
"overrides": [
{
"files": [
"demo/*.ts"
"test/demo/*.ts"
],
"rules": {
"no-console": "off"
Expand Down
File renamed without changes.
File renamed without changes.
25 changes: 25 additions & 0 deletions test/demo/dist/assets/bfcachetest-DN65M-3B.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { $ as $atom, a as $map } from "./index-BlEfZBFA.js";
let preAtom = document.querySelector("#atom");
let preMap = document.querySelector("#map");
let buttonAtom = document.querySelector("#buttonAtom");
let clearButtonAtom = document.querySelector("#clearAtom");
let buttonMap = document.querySelector("#buttonMap");
let clearButtonMap = document.querySelector("#clearMap");
buttonAtom.addEventListener("click", () => {
$atom.set([...$atom.get(), Math.random() * Date.now()]);
});
clearButtonAtom.addEventListener("click", () => {
$atom.set([]);
});
$atom.subscribe((val) => {
preAtom.textContent = JSON.stringify(val, null, 2);
});
buttonMap.addEventListener("click", () => {
$map.set({ ...$map.get(), a: String(Math.random() * Date.now()) });
});
clearButtonMap.addEventListener("click", () => {
$map.set({});
});
$map.subscribe((val) => {
preMap.textContent = JSON.stringify(val, null, 2);
});
Loading

0 comments on commit 08a4185

Please sign in to comment.