@alstar/create 0.0.0-beta.1 → 0.0.0-beta.11

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/main.js CHANGED
@@ -1,3 +1,82 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- console.log('hello from @alstar/cli')
3
+ import { intro, text, spinner, outro, log, isCancel, cancel } from '@clack/prompts'
4
+ import path from 'node:path'
5
+ import fs from 'node:fs/promises'
6
+
7
+ console.log(`
8
+ █████╗ ██╗ ███████╗████████╗ █████╗ ██████╗
9
+ ██╔══██╗██║ ██╔════╝╚══██╔══╝██╔══██╗██╔══██╗
10
+ ███████║██║ ███████╗ ██║ ███████║██████╔╝
11
+ ██╔══██║██║ ╚════██║ ██║ ██╔══██║██╔══██╗
12
+ ██║ ██║███████╗███████║ ██║ ██║ ██║██║ ██║
13
+ ╚═╝ ╚═╝╚══════╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝
14
+ `)
15
+
16
+ intro('@alstar/create')
17
+
18
+ log.info(`This will generate a new Alstar app`)
19
+
20
+ let defaultName = 'alstar-app'
21
+ let defaultDir = './'
22
+
23
+ const name = await text({
24
+ message: `What's the name of the project?`,
25
+ placeholder: defaultName,
26
+ })
27
+
28
+ if (isCancel(name)) {
29
+ cancel('Operation cancelled.')
30
+ process.exit(0)
31
+ }
32
+
33
+ const dir = await text({
34
+ message: 'Where should the project be located?',
35
+ placeholder: defaultDir,
36
+ })
37
+
38
+ if (isCancel(dir)) {
39
+ cancel('Operation cancelled.')
40
+ process.exit(0)
41
+ }
42
+
43
+ const projectName = name || defaultName
44
+ const projectDir = dir || defaultDir
45
+
46
+ const templatePath = path.join(import.meta.dirname, 'template')
47
+ const fullpath = path.join(path.resolve('.'), projectDir, projectName)
48
+
49
+ if (await directoryExists(fullpath)) {
50
+ cancel('Directory already exists')
51
+ process.exit(0)
52
+ }
53
+
54
+ const s = spinner()
55
+
56
+ s.start(`Creating project in ${projectDir}${projectName}`)
57
+
58
+ await fs.cp(templatePath, fullpath, { recursive: true })
59
+ await fs.rename(path.join(fullpath, '_gitignore'), path.join(fullpath, '.gitignore'))
60
+
61
+ s.stop(`Created project in ${path.join(projectDir, projectName)}`)
62
+
63
+ log.info(`Next step:
64
+ cd ${path.join(projectDir, projectName)}
65
+ pnpm install
66
+ pnpm dev`)
67
+
68
+ outro(`Done!`)
69
+
70
+ async function directoryExists(path) {
71
+ try {
72
+ const stats = await fs.stat(path)
73
+ return stats.isDirectory()
74
+ } catch (err) {
75
+ if (err.code === 'ENOENT') {
76
+ // Path does not exist
77
+ return false
78
+ }
79
+ // Some other error
80
+ throw err
81
+ }
82
+ }
package/package.json CHANGED
@@ -1,11 +1,17 @@
1
1
  {
2
2
  "name": "@alstar/create",
3
- "version": "0.0.0-beta.1",
3
+ "version": "0.0.0-beta.11",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "create": "main.js"
7
7
  },
8
8
  "publishConfig": {
9
9
  "access": "public"
10
+ },
11
+ "dependencies": {
12
+ "@clack/prompts": "^0.11.0"
13
+ },
14
+ "scripts": {
15
+ "cli:dev": "node --watch main.js"
10
16
  }
11
- }
17
+ }
@@ -1,3 +1,5 @@
1
1
  .env
2
2
  .DS_Store
3
- node_modules
3
+ node_modules
4
+
5
+ .db
@@ -0,0 +1,47 @@
1
+ import {
2
+ defineStructure,
3
+ defineSingle,
4
+ defineCollection,
5
+ defineField,
6
+ } from '@alstar/studio/structure'
7
+
8
+ export default {
9
+ siteName: 'My app',
10
+ structure: defineStructure({
11
+ homepage: defineSingle({
12
+ label: 'Homepage',
13
+ fields: {
14
+ title: defineField({
15
+ type: 'text',
16
+ label: 'Title',
17
+ }),
18
+ content: defineField({
19
+ type: 'markdown',
20
+ label: 'Content',
21
+ }),
22
+ },
23
+ }),
24
+ page: defineCollection({
25
+ label: 'Pages',
26
+ fields: {
27
+ title: defineField({
28
+ label: 'Title',
29
+ type: 'title',
30
+ }),
31
+ slug: defineField({
32
+ label: 'Slug',
33
+ type: 'slug',
34
+ }),
35
+ description: defineField({
36
+ label: 'Description',
37
+ type: 'text',
38
+ }),
39
+ image: defineField({
40
+ label: 'Image',
41
+ type: 'image',
42
+ description: 'A featured image for the page',
43
+ }),
44
+ },
45
+ }),
46
+ } as const),
47
+ }
package/template/index.ts CHANGED
@@ -1,21 +1,16 @@
1
- import { createStudio, defineStructure } from '@alstar/studio'
2
- import { createRefresher } from 'refresher'
1
+ import { Hono } from 'hono'
2
+ import { serve } from '@hono/node-server'
3
+ import { serveStatic } from '@hono/node-server/serve-static'
4
+ import { createStudio } from '@alstar/studio'
3
5
 
4
- createRefresher({ rootdir: '.' })
6
+ import Index from './pages/index.ts'
5
7
 
6
- const structure = defineStructure([
7
- {
8
- name: 'entry',
9
- label: 'Entry',
10
- type: 'entry',
11
- fields: [
12
- {
13
- name: 'title',
14
- label: 'Title',
15
- type: 'text',
16
- },
17
- ],
18
- },
19
- ])
8
+ const app = new Hono()
20
9
 
21
- await createStudio(structure)
10
+ app.route('/studio', createStudio())
11
+
12
+ app.use('*', serveStatic({ root: './public' }))
13
+
14
+ app.get('/', (c) => c.html(Index()))
15
+
16
+ serve(app, () => console.log('http://localhost:3000'))
@@ -2,15 +2,12 @@
2
2
  "name": "alstar-app",
3
3
  "type": "module",
4
4
  "scripts": {
5
- "dev": "node --watch index.ts",
6
- "start": "node index.ts"
7
- },
8
- "devDependencies": {
9
- "@types/node": "^24.1.0"
5
+ "dev": "pnpx tsx --watch index.ts",
6
+ "start": "pnpx tsx index.ts"
10
7
  },
11
8
  "dependencies": {
12
- "@alstar/studio": "workspace:*",
13
- "@alstar/refresher": "workspace:*",
14
- "hono": "^4.8.12"
9
+ "@alstar/studio": "latest",
10
+ "@hono/node-server": "^1.19.6",
11
+ "hono": "^4.10.6"
15
12
  }
16
13
  }
@@ -1,4 +1,39 @@
1
- import SiteLayout from "../components/SiteLayout";
2
- import Welcome from "../components/Welcome/Welcome";
1
+ import { html } from 'hono/html'
3
2
 
4
- export default () => SiteLayout(Welcome())
3
+ export default () => {
4
+ return html` <!DOCTYPE html>
5
+ <html lang="en">
6
+ <head>
7
+ <meta charset="UTF-8" />
8
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
+ <title>Alstar</title>
10
+
11
+ <link rel="icon" type="image/svg" href="/favicon.svg" />
12
+
13
+ <meta name="color-scheme" content="light dark" />
14
+
15
+ <link rel="stylesheet" href="/main.css" />
16
+ </head>
17
+ <body>
18
+ <section class="welcome">
19
+ <div>
20
+ <h1>
21
+ <a href="/" aria-label="Go to Alstars homepage">
22
+ <svg viewBox="0 0 1332 342" fill="none">
23
+ <path
24
+ d="M7.152 342C2.88533 342 0.752001 339.867 0.752001 335.6V98.288C0.752001 95.5573 1.60533 92.9973 3.312 90.608L63.728 4.59198C65.6053 2.03198 68.336 0.751984 71.92 0.751984H163.568C167.323 0.751984 170.053 2.03198 171.76 4.59198L232.688 90.608C234.395 92.9973 235.248 95.5573 235.248 98.288V335.6C235.248 339.867 233.115 342 228.848 342H135.152C130.885 342 128.752 339.867 128.752 335.6V239.6H107.248V335.6C107.248 339.867 105.115 342 100.848 342H7.152ZM118 150.768C125.339 150.768 131.312 148.464 135.92 143.856C140.528 139.248 142.832 133.36 142.832 126.192C142.832 118.853 140.528 112.88 135.92 108.272C131.312 103.664 125.339 101.36 118 101.36C110.661 101.36 104.688 103.664 100.08 108.272C95.472 112.88 93.168 118.853 93.168 126.192C93.168 133.36 95.472 139.248 100.08 143.856C104.688 148.464 110.661 150.768 118 150.768ZM263.152 342C258.885 342 256.752 339.867 256.752 335.6V7.15198C256.752 2.88531 258.885 0.751984 263.152 0.751984H356.848C361.115 0.751984 363.248 2.88531 363.248 7.15198V239.6H406.512C410.779 239.6 412.912 241.733 412.912 246V335.6C412.912 339.867 410.779 342 406.512 342H263.152ZM440.652 342C436.385 342 434.252 339.867 434.252 335.6V263.408C434.252 261.36 434.337 259.739 434.508 258.544C434.849 257.179 435.873 255.984 437.58 254.96L491.852 223.728V210.928L438.348 182.768C435.617 181.232 434.252 178.672 434.252 175.088V59.888C434.252 57.1573 434.423 55.1947 434.764 54C435.105 52.6347 436.3 51.184 438.348 49.648L505.932 4.07999C507.297 3.05598 508.748 2.28797 510.284 1.77597C511.82 1.09331 513.783 0.751984 516.172 0.751984H606.54C610.807 0.751984 612.94 2.88531 612.94 7.15198V82.928C612.94 86.6826 611.66 89.2427 609.1 90.608L542.028 120.048V133.36L609.1 171.76C611.66 172.955 612.94 175.685 612.94 179.952V291.312C612.94 292.677 612.684 294.128 612.172 295.664C611.831 297.029 610.977 298.139 609.612 298.992L529.228 338.928C528.204 339.611 526.924 340.293 525.388 340.976C524.023 341.659 522.657 342 521.292 342H440.652ZM676.748 342C672.481 342 670.348 339.867 670.348 335.6V103.152H640.652C636.385 103.152 634.252 101.019 634.252 96.752V7.15198C634.252 2.88531 636.385 0.751984 640.652 0.751984H807.052C811.319 0.751984 813.452 2.88531 813.452 7.15198V96.752C813.452 101.019 811.319 103.152 807.052 103.152H777.1V335.6C777.1 339.867 774.967 342 770.7 342H676.748ZM841.152 342C836.885 342 834.752 339.867 834.752 335.6V98.288C834.752 95.5573 835.605 92.9973 837.312 90.608L897.728 4.59198C899.605 2.03198 902.336 0.751984 905.92 0.751984H997.568C1001.32 0.751984 1004.05 2.03198 1005.76 4.59198L1066.69 90.608C1068.39 92.9973 1069.25 95.5573 1069.25 98.288V335.6C1069.25 339.867 1067.11 342 1062.85 342H969.152C964.885 342 962.752 339.867 962.752 335.6V239.6H941.248V335.6C941.248 339.867 939.115 342 934.848 342H841.152ZM952 150.768C959.339 150.768 965.312 148.464 969.92 143.856C974.528 139.248 976.832 133.36 976.832 126.192C976.832 118.853 974.528 112.88 969.92 108.272C965.312 103.664 959.339 101.36 952 101.36C944.661 101.36 938.688 103.664 934.08 108.272C929.472 112.88 927.168 118.853 927.168 126.192C927.168 133.36 929.472 139.248 934.08 143.856C938.688 148.464 944.661 150.768 952 150.768ZM1097.15 342C1092.89 342 1090.75 339.867 1090.75 335.6V7.15198C1090.75 2.88531 1092.89 0.751984 1097.15 0.751984H1253.57C1258.01 0.751984 1261.42 1.86132 1263.81 4.07999L1322.69 62.448C1324.57 64.1547 1325.76 65.6053 1326.27 66.8C1326.78 67.9946 1327.04 69.9573 1327.04 72.688V142.832C1327.04 145.051 1325.59 147.611 1322.69 150.512L1287.36 185.84L1281.73 190.96L1297.6 214.768L1329.6 276.208C1330.45 277.744 1330.97 279.28 1331.14 280.816C1331.48 282.181 1331.65 283.973 1331.65 286.192V335.6C1331.65 339.867 1329.51 342 1325.25 342H1244.35C1240.6 342 1238.04 340.293 1236.67 336.88L1201.6 246.768H1197.25V335.6C1197.25 339.867 1195.11 342 1190.85 342H1097.15ZM1208.77 139.76C1215.77 139.76 1221.4 137.541 1225.66 133.104C1230.1 128.667 1232.32 123.035 1232.32 116.208C1232.32 109.381 1230.1 103.835 1225.66 99.568C1221.4 95.1307 1215.77 92.912 1208.77 92.912C1201.94 92.912 1196.31 95.1307 1191.87 99.568C1187.61 103.835 1185.47 109.381 1185.47 116.208C1185.47 123.035 1187.61 128.667 1191.87 133.104C1196.31 137.541 1201.94 139.76 1208.77 139.76Z"
25
+ fill="currentcolor"
26
+ />
27
+ </svg>
28
+ </a>
29
+ </h1>
30
+
31
+ <ol>
32
+ <li>Get started by editing <code>pages/index.ts</code></li>
33
+ <li>Go to <a href="/studio">/studio</a> to add content</li>
34
+ </ol>
35
+ </div>
36
+ </section>
37
+ </body>
38
+ </html>`
39
+ }
@@ -2,5 +2,4 @@
2
2
  <path
3
3
  d="M89.728 512C83.328 512 80.128 508.8 80.128 502.4V146.432C80.128 142.336 81.408 138.496 83.968 134.912L174.592 5.88797C177.408 2.04797 181.504 0.127975 186.88 0.127975H324.352C329.984 0.127975 334.08 2.04797 336.64 5.88797L428.032 134.912C430.592 138.496 431.872 142.336 431.872 146.432V502.4C431.872 508.8 428.672 512 422.272 512H281.728C275.328 512 272.128 508.8 272.128 502.4V358.4H239.872V502.4C239.872 508.8 236.672 512 230.272 512H89.728ZM256 225.152C267.008 225.152 275.968 221.696 282.88 214.784C289.792 207.872 293.248 199.04 293.248 188.288C293.248 177.28 289.792 168.32 282.88 161.408C275.968 154.496 267.008 151.04 256 151.04C244.992 151.04 236.032 154.496 229.12 161.408C222.208 168.32 218.752 177.28 218.752 188.288C218.752 199.04 222.208 207.872 229.12 214.784C236.032 221.696 244.992 225.152 256 225.152Z"
4
4
  fill="#222222" />
5
- </svg>
6
-
5
+ </svg>
@@ -1,3 +1,83 @@
1
1
  body {
2
2
  margin: 0;
3
- }
3
+
4
+ font-family: monospace;
5
+ font-size: 15px;
6
+ color: #333;
7
+
8
+ text-rendering: geometricPrecision;
9
+ }
10
+
11
+ a {
12
+ color: dodgerblue;
13
+ }
14
+
15
+ code {
16
+ background-color: #eee;
17
+ padding: 0.255rem 0.375rem;
18
+ border-radius: 5px;
19
+ }
20
+
21
+ pre {
22
+ code {
23
+ line-height: 2;
24
+ }
25
+ }
26
+
27
+ @media (prefers-color-scheme: dark) {
28
+ body {
29
+ background: #222;
30
+ color: #eee;
31
+ }
32
+
33
+ a {
34
+ color: lightskyblue;
35
+ }
36
+
37
+ code {
38
+ background-color: #555;
39
+ }
40
+ }
41
+
42
+ section.welcome {
43
+ display: flex;
44
+ flex-direction: column;
45
+ align-items: center;
46
+ justify-content: center;
47
+
48
+ box-sizing: border-box;
49
+
50
+ width: 100%;
51
+ min-height: 100vh;
52
+ padding-bottom: 10vh;
53
+ margin-bottom: 0;
54
+
55
+ font-size: 15px;
56
+
57
+ div {
58
+ > h1 {
59
+ display: flex;
60
+ justify-content: center;
61
+
62
+ a {
63
+ display: block;
64
+ max-width: 150px;
65
+ color: inherit;
66
+ }
67
+
68
+ svg {
69
+ width: 100%;
70
+ }
71
+ }
72
+
73
+ ol {
74
+ margin-top: 2rem;
75
+ padding-left: 1.2rem;
76
+
77
+ li {
78
+ line-height: 2;
79
+ margin-bottom: 0.25rem;
80
+ }
81
+ }
82
+ }
83
+ }
@@ -1,3 +1,10 @@
1
1
  {
2
- "extends": "../../tsconfig.json",
2
+ "compilerOptions": {
3
+ "strict": true,
4
+ "esModuleInterop": true,
5
+ "allowImportingTsExtensions": true,
6
+ "noEmit": true,
7
+ "moduleResolution": "NodeNext",
8
+ "module": "nodenext"
9
+ }
3
10
  }
package/tsconfig.json ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "extends": "../../tsconfig.json",
3
+ "exclude": ["/template/**/*"]
4
+ }
@@ -1,27 +0,0 @@
1
- import { html } from 'hono/html'
2
- import { type HtmlEscapedString } from 'hono/utils/html'
3
-
4
- export default (
5
- content: string | HtmlEscapedString | Promise<HtmlEscapedString>
6
- ) => {
7
- return html`
8
- <!DOCTYPE html>
9
- <html lang="en">
10
- <head>
11
- <meta charset="UTF-8" />
12
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
13
- <title>Alster</title>
14
-
15
- <link rel="icon" type="image/svg" href="/favicon.svg" />
16
-
17
- <meta name="color-scheme" content="light dark" />
18
-
19
- <script src="refresh-client.js"></script>
20
- <link rel="stylesheet" href="/main.css" />
21
- </head>
22
- <body>
23
- ${content}
24
- </body>
25
- </html>
26
- `
27
- }
@@ -1,55 +0,0 @@
1
- section.welcome {
2
- display: flex;
3
- flex-direction: column;
4
- align-items: center;
5
- justify-content: center;
6
-
7
- box-sizing: border-box;
8
-
9
- width: 100%;
10
- min-height: 100vh;
11
- padding-bottom: 10vh;
12
- margin-bottom: 0;
13
-
14
- color: #333;
15
- font-family: 15px;
16
-
17
- a {
18
- color: dodgerblue;
19
- }
20
-
21
- div {
22
- > h1 {
23
- display: flex;
24
- justify-content: center;
25
-
26
- a {
27
- display: block;
28
- max-width: 150px;
29
- color: inherit;
30
- }
31
-
32
- svg {
33
- width: 100%;
34
- }
35
- }
36
-
37
- ol {
38
- font-family: monospace;
39
-
40
- margin-top: 2rem;
41
- padding-left: 1.2rem;
42
-
43
- li {
44
- line-height: 1.8;
45
- margin-bottom: 0.25rem;
46
- }
47
- }
48
-
49
- code {
50
- background-color: #eeeeee;
51
- padding: 0.375rem;
52
- border-radius: 4px;
53
- }
54
- }
55
- }
@@ -1,27 +0,0 @@
1
- import { html } from 'hono/html'
2
-
3
- export default () => {
4
- return html`
5
- <link rel="stylesheet" href="/components/Welcome/Welcome.css" />
6
-
7
- <section class="welcome">
8
- <div>
9
- <h1>
10
- <a href="/" aria-label="Go to Alsters homepage">
11
- <svg viewBox="0 0 1289 342" fill="none">
12
- <path
13
- d="M7.152 342C2.88533 342 0.752001 339.867 0.752001 335.6V98.288C0.752001 95.5573 1.60533 92.9973 3.312 90.608L63.728 4.59198C65.6053 2.03198 68.336 0.751984 71.92 0.751984H163.568C167.323 0.751984 170.053 2.03198 171.76 4.59198L232.688 90.608C234.395 92.9973 235.248 95.5573 235.248 98.288V335.6C235.248 339.867 233.115 342 228.848 342H135.152C130.885 342 128.752 339.867 128.752 335.6V239.6H107.248V335.6C107.248 339.867 105.115 342 100.848 342H7.152ZM118 150.768C125.339 150.768 131.312 148.464 135.92 143.856C140.528 139.248 142.832 133.36 142.832 126.192C142.832 118.853 140.528 112.88 135.92 108.272C131.312 103.664 125.339 101.36 118 101.36C110.661 101.36 104.688 103.664 100.08 108.272C95.472 112.88 93.168 118.853 93.168 126.192C93.168 133.36 95.472 139.248 100.08 143.856C104.688 148.464 110.661 150.768 118 150.768ZM263.152 342C258.885 342 256.752 339.867 256.752 335.6V7.15198C256.752 2.88531 258.885 0.751984 263.152 0.751984H356.848C361.115 0.751984 363.248 2.88531 363.248 7.15198V239.6H406.512C410.779 239.6 412.912 241.733 412.912 246V335.6C412.912 339.867 410.779 342 406.512 342H263.152ZM440.652 342C436.385 342 434.252 339.867 434.252 335.6V263.408C434.252 261.36 434.337 259.739 434.508 258.544C434.849 257.179 435.873 255.984 437.58 254.96L491.852 223.728V210.928L438.348 182.768C435.617 181.232 434.252 178.672 434.252 175.088V59.888C434.252 57.1573 434.423 55.1947 434.764 54C435.105 52.6347 436.3 51.184 438.348 49.648L505.932 4.07999C507.297 3.05598 508.748 2.28797 510.284 1.77597C511.82 1.09331 513.783 0.751984 516.172 0.751984H606.54C610.807 0.751984 612.94 2.88531 612.94 7.15198V82.928C612.94 86.6826 611.66 89.2427 609.1 90.608L542.028 120.048V133.36L609.1 171.76C611.66 172.955 612.94 175.685 612.94 179.952V291.312C612.94 292.677 612.684 294.128 612.172 295.664C611.831 297.029 610.977 298.139 609.612 298.992L529.228 338.928C528.204 339.611 526.924 340.293 525.388 340.976C524.023 341.659 522.657 342 521.292 342H440.652ZM676.748 342C672.481 342 670.348 339.867 670.348 335.6V103.152H640.652C636.385 103.152 634.252 101.019 634.252 96.752V7.15198C634.252 2.88531 636.385 0.751984 640.652 0.751984H807.052C811.319 0.751984 813.452 2.88531 813.452 7.15198V96.752C813.452 101.019 811.319 103.152 807.052 103.152H777.1V335.6C777.1 339.867 774.967 342 770.7 342H676.748ZM841.152 342C836.885 342 834.752 339.867 834.752 335.6V7.15198C834.752 2.88531 836.885 0.751984 841.152 0.751984H1019.33C1023.59 0.751984 1025.73 2.88531 1025.73 7.15198V96.752C1025.73 101.019 1023.59 103.152 1019.33 103.152H941.248V124.4H1019.33C1023.59 124.4 1025.73 126.533 1025.73 130.8V211.952C1025.73 216.219 1023.59 218.352 1019.33 218.352H941.248V239.6H1019.33C1023.59 239.6 1025.73 241.733 1025.73 246V335.6C1025.73 339.867 1023.59 342 1019.33 342H841.152ZM1053.65 342C1049.39 342 1047.25 339.867 1047.25 335.6V7.15198C1047.25 2.88531 1049.39 0.751984 1053.65 0.751984H1210.07C1214.51 0.751984 1217.92 1.86132 1220.31 4.07999L1279.19 62.448C1281.07 64.1547 1282.26 65.6053 1282.77 66.8C1283.28 67.9946 1283.54 69.9573 1283.54 72.688V142.832C1283.54 145.051 1282.09 147.611 1279.19 150.512L1243.86 185.84L1238.23 190.96L1254.1 214.768L1286.1 276.208C1286.95 277.744 1287.47 279.28 1287.64 280.816C1287.98 282.181 1288.15 283.973 1288.15 286.192V335.6C1288.15 339.867 1286.01 342 1281.75 342H1200.85C1197.1 342 1194.54 340.293 1193.17 336.88L1158.1 246.768H1153.75V335.6C1153.75 339.867 1151.61 342 1147.35 342H1053.65ZM1165.27 139.76C1172.27 139.76 1177.9 137.541 1182.16 133.104C1186.6 128.667 1188.82 123.035 1188.82 116.208C1188.82 109.381 1186.6 103.835 1182.16 99.568C1177.9 95.1307 1172.27 92.912 1165.27 92.912C1158.44 92.912 1152.81 95.1307 1148.37 99.568C1144.11 103.835 1141.97 109.381 1141.97 116.208C1141.97 123.035 1144.11 128.667 1148.37 133.104C1152.81 137.541 1158.44 139.76 1165.27 139.76Z"
14
- fill="currentColor"
15
- />
16
- </svg>
17
- </a>
18
- </h1>
19
-
20
- <ol>
21
- <li>Get started by editing <code>pages/index.ts</code></li>
22
- <li>Go to <a href="/admin">/admin</a> to add content</li>
23
- </ol>
24
- </div>
25
- </section>
26
- `
27
- }
@@ -1,12 +0,0 @@
1
- // client side script
2
- const eventSource = new EventSource('http://localhost:5432')
3
- eventSource.onmessage = () => {
4
- setTimeout(() => {
5
- window.location.reload()
6
- }, 1000)
7
- }
8
-
9
- console.log(
10
- '%c REFRESHER ACTIVE ',
11
- 'color: green; background: lightgreen; border-radius: 2px'
12
- )