Skip to content

Commit d57e677

Browse files
committed
update templates
1 parent e62c6f1 commit d57e677

File tree

9 files changed

+97
-62
lines changed

9 files changed

+97
-62
lines changed

.github/FUNDING.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# These are supported funding model platforms
22

33
github: [titoBouzout] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4-
patreon: # Replace with a single Patreon username
5-
open_collective: # Replace with a single Open Collective username
4+
patreon: # Replace with a single Patreon username
5+
open_collective: tito-bouzout # Replace with a single Open Collective username
66
ko_fi: # Replace with a single Ko-fi username
77
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
88
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry

html/index.html

Lines changed: 49 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,61 @@
55
<meta name="viewport" content="width=device-width, initial-scale=1" />
66
<meta name="theme-color" content="#0D1117" />
77
<title>pota App</title>
8+
<script type="importmap">{
9+
10+
"imports": {
11+
"pota": "https://pota.quack.uy/node_modules/pota/src/@main.js",
12+
13+
"pota/babel-preset": "https://pota.quack.uy/node_modules/pota/babel-preset/index.js",
14+
"pota/jsx-runtime": "https://pota.quack.uy/node_modules/pota/src/jsx-runtime.js",
15+
16+
"pota/html": "https://pota.quack.uy/node_modules/pota/src/html.js",
17+
"pota/web": "https://pota.quack.uy/node_modules/pota/src/web/@main.js",
18+
19+
"pota/plugin/autofocus": "https://pota.quack.uy/node_modules/pota/src/plugin/autofocus.js",
20+
"pota/plugin/bind": "https://pota.quack.uy/node_modules/pota/src/plugin/bind.js",
21+
"pota/plugin/clickOutside": "https://pota.quack.uy/node_modules/pota/src/plugin/clickOutside.js",
22+
"pota/plugin/clipboard": "https://pota.quack.uy/node_modules/pota/src/plugin/clipboard.js",
23+
"pota/plugin/fullscreen": "https://pota.quack.uy/node_modules/pota/src/plugin/fullscreen.js",
24+
"pota/plugin/pasteTextPlain": "https://pota.quack.uy/node_modules/pota/src/plugin/pasteTextPlain.js",
25+
"pota/plugin/useBrowser": "https://pota.quack.uy/node_modules/pota/src/plugin/useBrowser.js",
26+
"pota/plugin/useColor": "https://pota.quack.uy/node_modules/pota/src/plugin/useColor.js",
27+
"pota/plugin/useDocumentFocus": "https://pota.quack.uy/node_modules/pota/src/plugin/useDocumentFocus.js",
28+
"pota/plugin/useDocumentSize": "https://pota.quack.uy/node_modules/pota/src/plugin/useDocumentSize.js",
29+
"pota/plugin/useDocumentVisible": "https://pota.quack.uy/node_modules/pota/src/plugin/useDocumentVisible.js",
30+
"pota/plugin/useFocus": "https://pota.quack.uy/node_modules/pota/src/plugin/useFocus.js",
31+
"pota/plugin/useFullscreen": "https://pota.quack.uy/node_modules/pota/src/plugin/useFullscreen.js",
32+
"pota/plugin/useLocation": "https://pota.quack.uy/node_modules/pota/src/plugin/useLocation.js",
33+
"pota/plugin/useOrientation": "https://pota.quack.uy/node_modules/pota/src/plugin/useOrientation.js",
34+
"pota/plugin/usePaginate": "https://pota.quack.uy/node_modules/pota/src/plugin/usePaginate.js",
35+
"pota/plugin/usePolyfills": "https://pota.quack.uy/node_modules/pota/src/plugin/usePolyfills.js",
36+
"pota/plugin/useRandom": "https://pota.quack.uy/node_modules/pota/src/plugin/useRandom.js",
37+
"pota/plugin/useScroll": "https://pota.quack.uy/node_modules/pota/src/plugin/useScroll.js",
38+
"pota/plugin/useSelector": "https://pota.quack.uy/node_modules/pota/src/plugin/useSelector.js",
39+
"pota/plugin/useStream": "https://pota.quack.uy/node_modules/pota/src/plugin/useStream.js",
40+
"pota/plugin/useString": "https://pota.quack.uy/node_modules/pota/src/plugin/useString.js",
41+
"pota/plugin/useTest": "https://pota.quack.uy/node_modules/pota/src/plugin/useTest.js",
42+
"pota/plugin/useTime": "https://pota.quack.uy/node_modules/pota/src/plugin/useTime.js",
43+
"pota/plugin/useTimeout": "https://pota.quack.uy/node_modules/pota/src/plugin/useTimeout.js",
44+
"pota/plugin/useURL": "https://pota.quack.uy/node_modules/pota/src/plugin/useURL.js",
45+
46+
"pota/experiments": "https://pota.quack.uy/node_modules/pota/src/lib/experiments.js",
47+
"pota/reactive": "https://pota.quack.uy/node_modules/pota/src/lib/reactive.js",
48+
"pota/std": "https://pota.quack.uy/node_modules/pota/src/lib/std.js",
49+
"pota/store": "https://pota.quack.uy/node_modules/pota/src/lib/store.js",
50+
51+
"x/articles/": "/pages/%40articles/"
52+
}
53+
}</script>
854
</head>
955
<body>
1056
<noscript>The app requires JavaScript to be enabled</noscript>
1157
<script type="module">
1258
/**
13-
Compiler-less html example. `standalone` includes everything, you probably want
14-
to import from the depths of the lib instead.
59+
Compiler-less html example.
1560
*/
16-
import {
17-
render,
18-
signal,
19-
html,
20-
memo,
21-
} from "https://cdn.jsdelivr.net/npm/pota/dist/standalone.js";
61+
import { render, signal, memo } from "pota";
62+
import { html } from "pota/html";
2263

2364
function Counter() {
2465
const [count, setCount, updateCount] = signal(1);

js/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pota-template-js",
33
"description": "",
4-
"version": "0.0.0",
4+
"version": "0.0.1",
55
"type": "module",
66
"scripts": {
77
"start": "vite",
@@ -15,7 +15,7 @@
1515
"vite-plugin-babel": "^1.1.3"
1616
},
1717
"dependencies": {
18-
"pota": "^0.13.118"
18+
"pota": "^0.14.133"
1919
},
2020
"prettier": {
2121
"printWidth": 70,

js/src/index.jsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { render, signal, memo } from 'pota'
2-
import { Route } from 'pota/router'
1+
import { memo, render, signal } from 'pota'
2+
import { Router } from 'pota/web'
33

4-
import styles from './index.module.css'
54
import logo from './assets/logo.svg'
5+
import styles from './index.module.css'
66

77
function App() {
88
return (
@@ -46,11 +46,11 @@ function Menu() {
4646
}
4747
function Routing() {
4848
return (
49-
<Route path="/">
50-
<Route>Home!</Route>
51-
<Route.Default>404 Not Found!</Route.Default>
52-
<Route path="moon">Buttiful</Route>
53-
<Route path="rick" collapse={true}>
49+
<Router path="/">
50+
<Router>Home!</Router>
51+
<Router.Default>404 Not Found!</Router.Default>
52+
<Router path="moon">Buttiful</Router>
53+
<Router path="rick" collapse={true}>
5454
<iframe
5555
width="560"
5656
height="315"
@@ -59,8 +59,8 @@ function Routing() {
5959
frameborder="0"
6060
allowfullscreen
6161
></iframe>
62-
</Route>
63-
</Route>
62+
</Router>
63+
</Router>
6464
)
6565
}
6666

rollup/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
2-
"name": "pota-template-js",
2+
"name": "pota-template-rollup",
33
"description": "",
4-
"version": "0.0.0",
4+
"version": "0.0.1",
55
"type": "module",
66
"scripts": {
77
"dev": "rollup -c -w",
@@ -16,7 +16,7 @@
1616
"rollup": "^4.9.6"
1717
},
1818
"dependencies": {
19-
"pota": "^0.13.118"
19+
"pota": "^0.14.133"
2020
},
2121
"prettier": {
2222
"printWidth": 70,

rollup/rollup.config.js

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,21 @@ import babel from '@rollup/plugin-babel'
22
import resolve from '@rollup/plugin-node-resolve'
33
import terser from '@rollup/plugin-terser'
44

5-
const outputOptions = {
6-
format: 'es',
7-
sourcemap: false,
8-
}
9-
10-
const plugins = [
11-
resolve({}),
12-
babel({
13-
babelHelpers: 'bundled',
14-
presets: [['pota/babel-preset']],
15-
}),
16-
terser(),
17-
]
18-
195
export default [
206
{
217
input: './src/index.jsx',
22-
plugins,
8+
plugins: [
9+
resolve({}),
10+
babel({
11+
babelHelpers: 'bundled',
12+
presets: [['pota/babel-preset']],
13+
}),
14+
terser(),
15+
],
2316
output: [
2417
{
25-
...outputOptions,
18+
format: 'es',
19+
sourcemap: true,
2620
file: './dist/index.js',
2721
},
2822
],

rollup/src/index.jsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { render, signal, memo } from 'pota'
2-
import { Route } from 'pota/router'
1+
import { memo, render, signal } from 'pota'
2+
import { Router } from 'pota/web'
33

44
function App() {
55
return (
@@ -119,11 +119,11 @@ function Menu() {
119119
}
120120
function Routing() {
121121
return (
122-
<Route path="/">
123-
<Route>Home!</Route>
124-
<Route.Default>404 Not Found!</Route.Default>
125-
<Route path="moon">Buttiful</Route>
126-
<Route path="rick" collapse={true}>
122+
<Router path="/">
123+
<Router>Home!</Router>
124+
<Router.Default>404 Not Found!</Router.Default>
125+
<Router path="moon">Buttiful</Router>
126+
<Router path="rick" collapse={true}>
127127
<iframe
128128
width="560"
129129
height="315"
@@ -132,8 +132,8 @@ function Routing() {
132132
frameborder="0"
133133
allowfullscreen
134134
></iframe>
135-
</Route>
136-
</Route>
135+
</Router>
136+
</Router>
137137
)
138138
}
139139

ts/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pota-template-ts",
33
"description": "",
4-
"version": "0.0.0",
4+
"version": "0.0.1",
55
"type": "module",
66
"scripts": {
77
"start": "vite",
@@ -16,7 +16,7 @@
1616
"vite-plugin-babel": "^1.2.0"
1717
},
1818
"dependencies": {
19-
"pota": "^0.13.118"
19+
"pota": "^0.14.133"
2020
},
2121
"prettier": {
2222
"printWidth": 70,

ts/src/index.tsx

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import { render, signal, memo } from 'pota'
2-
import { Route } from 'pota/router'
1+
import { memo, render, signal } from 'pota'
2+
import { Router } from 'pota/web'
33

4-
import styles from './index.module.css'
54
import logo from './assets/logo.svg'
5+
import styles from './index.module.css'
66

77
function App() {
88
return (
@@ -46,11 +46,11 @@ function Menu() {
4646
}
4747
function Routing() {
4848
return (
49-
<Route path="/">
50-
<Route>Home!</Route>
51-
<Route.Default>404 Not Found!</Route.Default>
52-
<Route path="moon">Buttiful</Route>
53-
<Route path="rick" collapse={true}>
49+
<Router path="/">
50+
<Router>Home!</Router>
51+
<Router.Default>404 Not Found!</Router.Default>
52+
<Router path="moon">Buttiful</Router>
53+
<Router path="rick" collapse={true}>
5454
<iframe
5555
width="560"
5656
height="315"
@@ -59,8 +59,8 @@ function Routing() {
5959
frameborder="0"
6060
allowfullscreen
6161
></iframe>
62-
</Route>
63-
</Route>
62+
</Router>
63+
</Router>
6464
)
6565
}
6666

0 commit comments

Comments
 (0)