create-vite-hyperapp 1.3.0 → 2.0.1
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 +110 -18
- package/create-vite-hyperapp.mjs +193 -0
- package/package.json +18 -11
- package/templates/{template → common}/_gitignore +1 -1
- package/templates/{template-ts/src → common/src/app}/style.css +0 -4
- package/templates/{template → js-html-cli}/index.html +3 -3
- package/templates/js-html-cli/jsconfig.json +13 -0
- package/templates/js-html-cli/package.json +20 -0
- package/templates/js-html-cli/src/app/counter.js +5 -0
- package/templates/js-html-cli/src/app/logos.js +24 -0
- package/templates/js-html-cli/src/app/main.js +24 -0
- package/templates/{template → js-html-cli}/src/run.js +2 -2
- package/templates/js-html-cli/vite.config.js +12 -0
- package/templates/{template-ssr → js-html-ssr}/index.html +2 -2
- package/templates/js-html-ssr/jsconfig.json +13 -0
- package/templates/js-html-ssr/package.json +25 -0
- package/templates/{template-ssr → js-html-ssr}/server.js +10 -8
- package/templates/js-html-ssr/src/app/counter.js +5 -0
- package/templates/js-html-ssr/src/app/logos.js +24 -0
- package/templates/js-html-ssr/src/app/main.js +24 -0
- package/templates/{template-ssr → js-html-ssr}/src/entry-client.js +2 -2
- package/templates/js-html-ssr/src/entry-server.js +5 -0
- package/templates/js-html-ssr/vite.config.js +13 -0
- package/templates/js-jsx-cli/index.html +13 -0
- package/templates/js-jsx-cli/jsconfig.json +15 -0
- package/templates/{template → js-jsx-cli}/package.json +3 -3
- package/templates/js-jsx-cli/src/app/logos.jsx +15 -0
- package/templates/{template/src → js-jsx-cli/src/app}/main.jsx +1 -13
- package/templates/js-jsx-cli/src/run.js +5 -0
- package/templates/js-jsx-cli/vite.config.js +12 -0
- package/templates/js-jsx-ssr/index.html +13 -0
- package/templates/js-jsx-ssr/jsconfig.json +15 -0
- package/templates/{template-ssr → js-jsx-ssr}/package.json +7 -7
- package/templates/{template-ts-ssr → js-jsx-ssr}/server.js +11 -9
- package/templates/js-jsx-ssr/src/app/logos.jsx +15 -0
- package/templates/{template-ssr/src → js-jsx-ssr/src/app}/main.jsx +1 -13
- package/templates/js-jsx-ssr/src/entry-client.js +5 -0
- package/templates/js-jsx-ssr/src/entry-server.js +5 -0
- package/templates/js-jsx-ssr/vite.config.js +13 -0
- package/templates/js-plain-cli/index.html +13 -0
- package/templates/js-plain-cli/jsconfig.json +13 -0
- package/templates/{template-ts → js-plain-cli}/package.json +4 -5
- package/templates/js-plain-cli/src/app/counter.js +8 -0
- package/templates/js-plain-cli/src/app/logos.js +18 -0
- package/templates/js-plain-cli/src/app/main.js +25 -0
- package/templates/js-plain-cli/src/run.js +5 -0
- package/templates/js-plain-cli/vite.config.js +12 -0
- package/templates/js-plain-ssr/index.html +13 -0
- package/templates/js-plain-ssr/jsconfig.json +13 -0
- package/templates/{template-ts-ssr → js-plain-ssr}/package.json +8 -9
- package/templates/js-plain-ssr/server.js +62 -0
- package/templates/js-plain-ssr/src/app/counter.js +8 -0
- package/templates/js-plain-ssr/src/app/logos.js +18 -0
- package/templates/js-plain-ssr/src/app/main.js +25 -0
- package/templates/js-plain-ssr/src/entry-client.js +5 -0
- package/templates/js-plain-ssr/src/entry-server.js +5 -0
- package/templates/js-plain-ssr/vite.config.js +13 -0
- package/templates/tj-html-cli/index.html +13 -0
- package/templates/tj-html-cli/jsconfig.json +29 -0
- package/templates/tj-html-cli/package.json +21 -0
- package/templates/tj-html-cli/src/app/counter.js +16 -0
- package/templates/tj-html-cli/src/app/logos.js +24 -0
- package/templates/tj-html-cli/src/app/main.js +27 -0
- package/templates/tj-html-cli/src/run.js +5 -0
- package/templates/tj-html-cli/src/types/global.d.ts +13 -0
- package/templates/tj-html-cli/src/types/hyperapp-html.d.ts +101 -0
- package/templates/tj-html-cli/src/types/hyperapp-svg.d.ts +73 -0
- package/templates/tj-html-cli/src/types/hyperapp-tags.d.ts +34 -0
- package/templates/tj-html-cli/vite.config.js +12 -0
- package/templates/tj-html-ssr/index.html +13 -0
- package/templates/tj-html-ssr/jsconfig.json +31 -0
- package/templates/tj-html-ssr/package.json +29 -0
- package/templates/tj-html-ssr/server.js +63 -0
- package/templates/tj-html-ssr/src/app/counter.js +16 -0
- package/templates/tj-html-ssr/src/app/logos.js +24 -0
- package/templates/tj-html-ssr/src/app/main.js +27 -0
- package/templates/tj-html-ssr/src/entry-client.js +5 -0
- package/templates/tj-html-ssr/src/entry-server.js +5 -0
- package/templates/tj-html-ssr/src/types/global.d.ts +13 -0
- package/templates/tj-html-ssr/src/types/hyperapp-html.d.ts +101 -0
- package/templates/tj-html-ssr/src/types/hyperapp-svg.d.ts +73 -0
- package/templates/tj-html-ssr/src/types/hyperapp-tags.d.ts +34 -0
- package/templates/tj-html-ssr/vite.config.js +13 -0
- package/templates/tj-jsx-cli/index.html +13 -0
- package/templates/tj-jsx-cli/jsconfig.json +31 -0
- package/templates/tj-jsx-cli/package.json +19 -0
- package/templates/tj-jsx-cli/src/app/counter.jsx +18 -0
- package/templates/tj-jsx-cli/src/app/logos.jsx +15 -0
- package/templates/tj-jsx-cli/src/app/main.jsx +26 -0
- package/templates/tj-jsx-cli/src/run.js +5 -0
- package/templates/tj-jsx-cli/src/types/global.d.ts +13 -0
- package/templates/tj-jsx-cli/vite.config.js +12 -0
- package/templates/tj-jsx-ssr/index.html +13 -0
- package/templates/tj-jsx-ssr/jsconfig.json +33 -0
- package/templates/tj-jsx-ssr/package.json +27 -0
- package/templates/tj-jsx-ssr/server.js +63 -0
- package/templates/tj-jsx-ssr/src/app/counter.jsx +18 -0
- package/templates/tj-jsx-ssr/src/app/logos.jsx +15 -0
- package/templates/tj-jsx-ssr/src/app/main.jsx +26 -0
- package/templates/tj-jsx-ssr/src/entry-client.js +5 -0
- package/templates/tj-jsx-ssr/src/entry-server.js +5 -0
- package/templates/tj-jsx-ssr/src/types/global.d.ts +13 -0
- package/templates/tj-jsx-ssr/vite.config.js +13 -0
- package/templates/tj-plain-cli/index.html +13 -0
- package/templates/tj-plain-cli/jsconfig.json +29 -0
- package/templates/tj-plain-cli/package.json +19 -0
- package/templates/tj-plain-cli/src/app/counter.js +19 -0
- package/templates/tj-plain-cli/src/app/logos.js +18 -0
- package/templates/tj-plain-cli/src/app/main.js +28 -0
- package/templates/tj-plain-cli/src/run.js +5 -0
- package/templates/tj-plain-cli/src/types/global.d.ts +13 -0
- package/templates/tj-plain-cli/src/types/hyperapp-h.d.ts +37 -0
- package/templates/tj-plain-cli/vite.config.js +12 -0
- package/templates/tj-plain-ssr/index.html +13 -0
- package/templates/tj-plain-ssr/jsconfig.json +31 -0
- package/templates/tj-plain-ssr/package.json +27 -0
- package/templates/tj-plain-ssr/server.js +63 -0
- package/templates/tj-plain-ssr/src/app/counter.js +19 -0
- package/templates/tj-plain-ssr/src/app/logos.js +18 -0
- package/templates/tj-plain-ssr/src/app/main.js +28 -0
- package/templates/tj-plain-ssr/src/entry-client.js +5 -0
- package/templates/tj-plain-ssr/src/entry-server.js +5 -0
- package/templates/tj-plain-ssr/src/types/global.d.ts +13 -0
- package/templates/tj-plain-ssr/src/types/hyperapp-h.d.ts +37 -0
- package/templates/tj-plain-ssr/vite.config.js +13 -0
- package/templates/{template-ts → ts-html-cli}/index.html +3 -3
- package/templates/ts-html-cli/package.json +21 -0
- package/templates/ts-html-cli/src/app/counter.ts +12 -0
- package/templates/ts-html-cli/src/app/logos.ts +33 -0
- package/templates/ts-html-cli/src/app/main.ts +27 -0
- package/templates/{template-ts → ts-html-cli}/src/run.ts +2 -2
- package/templates/ts-html-cli/src/types/hyperapp-html.d.ts +101 -0
- package/templates/ts-html-cli/src/types/hyperapp-svg.d.ts +73 -0
- package/templates/ts-html-cli/src/types/hyperapp-tags.d.ts +34 -0
- package/templates/ts-html-cli/tsconfig.json +27 -0
- package/templates/ts-html-cli/vite.config.ts +12 -0
- package/templates/{template-ts-ssr → ts-html-ssr}/index.html +2 -2
- package/templates/ts-html-ssr/package.json +32 -0
- package/templates/ts-html-ssr/server.ts +63 -0
- package/templates/ts-html-ssr/src/app/counter.ts +12 -0
- package/templates/ts-html-ssr/src/app/logos.ts +33 -0
- package/templates/ts-html-ssr/src/app/main.ts +27 -0
- package/templates/{template-ts-ssr → ts-html-ssr}/src/entry-client.ts +2 -2
- package/templates/ts-html-ssr/src/entry-server.ts +5 -0
- package/templates/ts-html-ssr/src/types/hyperapp-html.d.ts +101 -0
- package/templates/ts-html-ssr/src/types/hyperapp-svg.d.ts +73 -0
- package/templates/ts-html-ssr/src/types/hyperapp-tags.d.ts +34 -0
- package/templates/ts-html-ssr/tsconfig.json +27 -0
- package/templates/ts-html-ssr/vite.config.ts +13 -0
- package/templates/ts-jsx-cli/index.html +13 -0
- package/templates/ts-jsx-cli/package.json +21 -0
- package/templates/ts-jsx-cli/src/app/counter.tsx +14 -0
- package/templates/ts-jsx-cli/src/app/logos.tsx +19 -0
- package/templates/ts-jsx-cli/src/app/main.tsx +26 -0
- package/templates/ts-jsx-cli/src/assets/typescript.svg +1 -0
- package/templates/ts-jsx-cli/src/run.ts +5 -0
- package/templates/{template-ts → ts-jsx-cli}/tsconfig.json +6 -3
- package/templates/ts-jsx-cli/vite.config.ts +12 -0
- package/templates/ts-jsx-ssr/index.html +13 -0
- package/templates/ts-jsx-ssr/package.json +30 -0
- package/templates/ts-jsx-ssr/server.ts +63 -0
- package/templates/ts-jsx-ssr/src/app/counter.tsx +14 -0
- package/templates/ts-jsx-ssr/src/app/logos.tsx +19 -0
- package/templates/ts-jsx-ssr/src/app/main.tsx +26 -0
- package/templates/ts-jsx-ssr/src/assets/typescript.svg +1 -0
- package/templates/ts-jsx-ssr/src/entry-client.ts +5 -0
- package/templates/ts-jsx-ssr/src/entry-server.ts +5 -0
- package/templates/{template-ts-ssr → ts-jsx-ssr}/tsconfig.json +7 -4
- package/templates/ts-jsx-ssr/vite.config.ts +13 -0
- package/templates/ts-plain-cli/index.html +13 -0
- package/templates/ts-plain-cli/package.json +21 -0
- package/templates/ts-plain-cli/src/app/counter.ts +13 -0
- package/templates/ts-plain-cli/src/app/logos.ts +30 -0
- package/templates/ts-plain-cli/src/app/main.ts +27 -0
- package/templates/ts-plain-cli/src/assets/typescript.svg +1 -0
- package/templates/ts-plain-cli/src/run.ts +5 -0
- package/templates/ts-plain-cli/src/types/hyperapp-h.d.ts +37 -0
- package/templates/ts-plain-cli/tsconfig.json +27 -0
- package/templates/ts-plain-cli/vite.config.ts +12 -0
- package/templates/ts-plain-ssr/index.html +13 -0
- package/templates/ts-plain-ssr/package.json +30 -0
- package/templates/ts-plain-ssr/server.ts +63 -0
- package/templates/ts-plain-ssr/src/app/counter.ts +13 -0
- package/templates/ts-plain-ssr/src/app/logos.ts +30 -0
- package/templates/ts-plain-ssr/src/app/main.ts +27 -0
- package/templates/ts-plain-ssr/src/assets/typescript.svg +1 -0
- package/templates/ts-plain-ssr/src/entry-client.ts +5 -0
- package/templates/ts-plain-ssr/src/entry-server.ts +5 -0
- package/templates/ts-plain-ssr/src/types/hyperapp-h.d.ts +37 -0
- package/templates/ts-plain-ssr/tsconfig.json +27 -0
- package/templates/ts-plain-ssr/vite.config.ts +13 -0
- package/index.js +0 -154
- package/templates/template/public/vite.svg +0 -1
- package/templates/template/src/hyperapp.svg +0 -4
- package/templates/template/src/style.css +0 -97
- package/templates/template/vite.config.js +0 -6
- package/templates/template-ssr/_gitignore +0 -24
- package/templates/template-ssr/src/entry-server.js +0 -5
- package/templates/template-ssr/src/style.css +0 -97
- package/templates/template-ssr/vite.config.js +0 -6
- package/templates/template-ts/_gitignore +0 -24
- package/templates/template-ts/public/vite.svg +0 -1
- package/templates/template-ts/src/counter.tsx +0 -14
- package/templates/template-ts/src/hyperapp.svg +0 -4
- package/templates/template-ts/src/main.tsx +0 -43
- package/templates/template-ts/src/vite-env.d.ts +0 -2
- package/templates/template-ts/vite.config.ts +0 -6
- package/templates/template-ts-ssr/_gitignore +0 -24
- package/templates/template-ts-ssr/public/vite.svg +0 -1
- package/templates/template-ts-ssr/src/counter.tsx +0 -14
- package/templates/template-ts-ssr/src/entry-server.ts +0 -5
- package/templates/template-ts-ssr/src/main.tsx +0 -43
- package/templates/template-ts-ssr/src/style.css +0 -97
- package/templates/template-ts-ssr/src/vite-env.d.ts +0 -2
- package/templates/template-ts-ssr/vite.config.ts +0 -6
- /package/templates/{template-ssr/src/hyperapp.svg → common/public/favicon.svg} +0 -0
- /package/templates/{template-ts-ssr/src → common/src/assets}/hyperapp.svg +0 -0
- /package/templates/{template-ssr/public → common/src/assets}/vite.svg +0 -0
- /package/templates/{template-ssr/src → js-jsx-cli/src/app}/counter.jsx +0 -0
- /package/templates/{template/src → js-jsx-ssr/src/app}/counter.jsx +0 -0
- /package/templates/{template-ts-ssr/src → ts-html-cli/src/assets}/typescript.svg +0 -0
- /package/templates/{template-ts/src → ts-html-ssr/src/assets}/typescript.svg +0 -0
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Logs
|
|
2
|
-
logs
|
|
3
|
-
*.log
|
|
4
|
-
npm-debug.log*
|
|
5
|
-
yarn-debug.log*
|
|
6
|
-
yarn-error.log*
|
|
7
|
-
pnpm-debug.log*
|
|
8
|
-
lerna-debug.log*
|
|
9
|
-
|
|
10
|
-
node_modules
|
|
11
|
-
dist
|
|
12
|
-
dist-ssr
|
|
13
|
-
*.local
|
|
14
|
-
|
|
15
|
-
# Editor directories and files
|
|
16
|
-
.vscode/*
|
|
17
|
-
!.vscode/extensions.json
|
|
18
|
-
.idea
|
|
19
|
-
.DS_Store
|
|
20
|
-
*.suo
|
|
21
|
-
*.ntvs*
|
|
22
|
-
*.njsproj
|
|
23
|
-
*.sln
|
|
24
|
-
*.sw?
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type Action } from "hyperapp"
|
|
2
|
-
|
|
3
|
-
type CounterProps = {
|
|
4
|
-
clicks: number
|
|
5
|
-
onclick: Action<any>
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const Counter = ({ clicks, onclick }: CounterProps) => (
|
|
9
|
-
<div class="card">
|
|
10
|
-
<button onclick={onclick}>Clicks: {clicks}</button>
|
|
11
|
-
</div>
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
export default Counter
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
<svg viewBox="-20 -20 230 160" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" >
|
|
2
|
-
<rect x="-20" y="-20" width="100%" height="100%" fill="#0080FF" rx="15"/>
|
|
3
|
-
<path d="M69.3175129,49.6122454 L109.331858,49.6122454 L118.942605,69.3176912 L69.3175129,69.3176912 L69.3175129,118.931378 L49.6154815,118.931378 L49.6154815,69.3176912 L0,69.3176912 L0,49.6122454 L49.6154815,49.6122454 L49.6154815,0 L69.3175129,0 L69.3175129,49.6122454 Z M192.738726,118.931378 L169.523967,118.931378 L111.518303,0 L134.733062,0 L192.738726,118.931378 Z" fill="#FFFFFF" fill-rule="nonzero"></path>
|
|
4
|
-
</svg>
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import "./style.css"
|
|
2
|
-
import typescriptLogo from "./typescript.svg"
|
|
3
|
-
import hyperappLogo from "./hyperapp.svg"
|
|
4
|
-
import viteLogo from "/vite.svg"
|
|
5
|
-
import { type Action, type VNode } from "hyperapp"
|
|
6
|
-
import Counter from "./counter"
|
|
7
|
-
|
|
8
|
-
type State = { counter: number }
|
|
9
|
-
|
|
10
|
-
export const init: Action<State> = () => ({
|
|
11
|
-
counter: 0,
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
const HandleClick: Action<State> = state => ({
|
|
15
|
-
...state,
|
|
16
|
-
counter: state.counter + 1,
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
const Logos = () => (
|
|
20
|
-
<>
|
|
21
|
-
<a href="https://vitejs.dev">
|
|
22
|
-
<img src={viteLogo} class="logo" alt="Vite logo" />
|
|
23
|
-
</a>
|
|
24
|
-
<a href="https://hyperapp.dev/">
|
|
25
|
-
<img src={hyperappLogo} class="logo vanilla" alt="Hyperapp logo" />
|
|
26
|
-
</a>
|
|
27
|
-
<a href="https://www.typescriptlang.org/">
|
|
28
|
-
<img src={typescriptLogo} class="logo vanilla" alt="TypeScript logo" />
|
|
29
|
-
</a>
|
|
30
|
-
</>
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
export const view = (state: State) =>
|
|
34
|
-
(
|
|
35
|
-
<main id="app">
|
|
36
|
-
<h1>Vite + Hyperapp + TypeScript</h1>
|
|
37
|
-
<Logos />
|
|
38
|
-
<Counter clicks={state.counter} onclick={HandleClick} />
|
|
39
|
-
<p class="read-the-docs">
|
|
40
|
-
Click on the Vite, Hyperapp & TypeScript logos to learn more
|
|
41
|
-
</p>
|
|
42
|
-
</main>
|
|
43
|
-
) as VNode<State>
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Logs
|
|
2
|
-
logs
|
|
3
|
-
*.log
|
|
4
|
-
npm-debug.log*
|
|
5
|
-
yarn-debug.log*
|
|
6
|
-
yarn-error.log*
|
|
7
|
-
pnpm-debug.log*
|
|
8
|
-
lerna-debug.log*
|
|
9
|
-
|
|
10
|
-
node_modules
|
|
11
|
-
dist
|
|
12
|
-
dist-ssr
|
|
13
|
-
*.local
|
|
14
|
-
|
|
15
|
-
# Editor directories and files
|
|
16
|
-
.vscode/*
|
|
17
|
-
!.vscode/extensions.json
|
|
18
|
-
.idea
|
|
19
|
-
.DS_Store
|
|
20
|
-
*.suo
|
|
21
|
-
*.ntvs*
|
|
22
|
-
*.njsproj
|
|
23
|
-
*.sln
|
|
24
|
-
*.sw?
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type Action } from "hyperapp"
|
|
2
|
-
|
|
3
|
-
type CounterProps = {
|
|
4
|
-
clicks: number
|
|
5
|
-
onclick: Action<any>
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
const Counter = ({ clicks, onclick }: CounterProps) => (
|
|
9
|
-
<div class="card">
|
|
10
|
-
<button onclick={onclick}>Clicks: {clicks}</button>
|
|
11
|
-
</div>
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
export default Counter
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import "./style.css"
|
|
2
|
-
import typescriptLogo from "./typescript.svg"
|
|
3
|
-
import hyperappLogo from "./hyperapp.svg"
|
|
4
|
-
import viteLogo from "/vite.svg"
|
|
5
|
-
import { type Action, type VNode } from "hyperapp"
|
|
6
|
-
import Counter from "./counter"
|
|
7
|
-
|
|
8
|
-
type State = { counter: number }
|
|
9
|
-
|
|
10
|
-
export const init: Action<State> = () => ({
|
|
11
|
-
counter: 0,
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
const HandleClick: Action<State> = (state: State) => ({
|
|
15
|
-
...state,
|
|
16
|
-
counter: state.counter + 1,
|
|
17
|
-
})
|
|
18
|
-
|
|
19
|
-
const Logos = () => (
|
|
20
|
-
<>
|
|
21
|
-
<a href="https://vitejs.dev">
|
|
22
|
-
<img src={viteLogo} class="logo" alt="Vite logo" />
|
|
23
|
-
</a>
|
|
24
|
-
<a href="https://hyperapp.dev/">
|
|
25
|
-
<img src={hyperappLogo} class="logo vanilla" alt="Hyperapp logo" />
|
|
26
|
-
</a>
|
|
27
|
-
<a href="https://www.typescriptlang.org/">
|
|
28
|
-
<img src={typescriptLogo} class="logo vanilla" alt="TypeScript logo" />
|
|
29
|
-
</a>
|
|
30
|
-
</>
|
|
31
|
-
)
|
|
32
|
-
|
|
33
|
-
export const view = (state: State) =>
|
|
34
|
-
(
|
|
35
|
-
<main id="app">
|
|
36
|
-
<h1>Vite (SSR) + Hyperapp + TypeScript</h1>
|
|
37
|
-
<Logos />
|
|
38
|
-
<Counter clicks={state.counter} onclick={HandleClick} />
|
|
39
|
-
<p class="read-the-docs">
|
|
40
|
-
Click on the Vite, Hyperapp & TypeScript logos to learn more
|
|
41
|
-
</p>
|
|
42
|
-
</main>
|
|
43
|
-
) as VNode<State>
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
:root {
|
|
2
|
-
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
|
|
3
|
-
line-height: 1.5;
|
|
4
|
-
font-weight: 400;
|
|
5
|
-
|
|
6
|
-
color-scheme: light dark;
|
|
7
|
-
color: rgba(255, 255, 255, 0.87);
|
|
8
|
-
background-color: #242424;
|
|
9
|
-
|
|
10
|
-
font-synthesis: none;
|
|
11
|
-
text-rendering: optimizeLegibility;
|
|
12
|
-
-webkit-font-smoothing: antialiased;
|
|
13
|
-
-moz-osx-font-smoothing: grayscale;
|
|
14
|
-
-webkit-text-size-adjust: 100%;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
a {
|
|
18
|
-
font-weight: 500;
|
|
19
|
-
color: #646cff;
|
|
20
|
-
text-decoration: inherit;
|
|
21
|
-
}
|
|
22
|
-
a:hover {
|
|
23
|
-
color: #535bf2;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
body {
|
|
27
|
-
margin: 0;
|
|
28
|
-
display: flex;
|
|
29
|
-
place-items: center;
|
|
30
|
-
min-width: 320px;
|
|
31
|
-
min-height: 100vh;
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
h1 {
|
|
35
|
-
font-size: 3.2em;
|
|
36
|
-
line-height: 1.1;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
#app {
|
|
40
|
-
max-width: 1280px;
|
|
41
|
-
margin: 0 auto;
|
|
42
|
-
padding: 2rem;
|
|
43
|
-
text-align: center;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
.logo {
|
|
47
|
-
height: 6em;
|
|
48
|
-
padding: 1.5em;
|
|
49
|
-
will-change: filter;
|
|
50
|
-
transition: filter 300ms;
|
|
51
|
-
}
|
|
52
|
-
.logo:hover {
|
|
53
|
-
filter: drop-shadow(0 0 2em #646cffaa);
|
|
54
|
-
}
|
|
55
|
-
.logo.vanilla:hover {
|
|
56
|
-
filter: drop-shadow(0 0 2em #3178c6aa);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.card {
|
|
60
|
-
padding: 2em;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
.read-the-docs {
|
|
64
|
-
color: #888;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
button {
|
|
68
|
-
border-radius: 8px;
|
|
69
|
-
border: 1px solid transparent;
|
|
70
|
-
padding: 0.6em 1.2em;
|
|
71
|
-
font-size: 1em;
|
|
72
|
-
font-weight: 500;
|
|
73
|
-
font-family: inherit;
|
|
74
|
-
background-color: #1a1a1a;
|
|
75
|
-
cursor: pointer;
|
|
76
|
-
transition: border-color 0.25s;
|
|
77
|
-
}
|
|
78
|
-
button:hover {
|
|
79
|
-
border-color: #646cff;
|
|
80
|
-
}
|
|
81
|
-
button:focus,
|
|
82
|
-
button:focus-visible {
|
|
83
|
-
outline: 4px auto -webkit-focus-ring-color;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@media (prefers-color-scheme: light) {
|
|
87
|
-
:root {
|
|
88
|
-
color: #213547;
|
|
89
|
-
background-color: #ffffff;
|
|
90
|
-
}
|
|
91
|
-
a:hover {
|
|
92
|
-
color: #747bff;
|
|
93
|
-
}
|
|
94
|
-
button {
|
|
95
|
-
background-color: #f9f9f9;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|