Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 505a0d4

Browse files
author
X
authored
Merge pull request #15 from alephjs/react-refresh-typescript
fix for repository path changed
2 parents e06e9af + 5403e2b commit 505a0d4

File tree

19 files changed

+221
-26
lines changed

19 files changed

+221
-26
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ The React Framework in [Deno](https://deno.land), inspired by [Next.js](https://
66
<br>
77
[Website](https://alephjs.org) | [Get Started](https://alephjs.org/docs/get-started) | [Docs](https://alephjs.org/docs) | [ESM](https://esm.sh) | [The Aleph (by Jorge Luis Borges)](http://www.phinnweb.org/links/literature/borges/aleph.html)
88

9-
[![Aleph.js in Deno](https://github.com/postui/aleph.js/workflows/Aleph.js%20in%20Deno/badge.svg)](https://github.com/postui/aleph.js/actions?query=workflow%3A%22Aleph.js+in+Deno%22)
9+
[![Aleph.js in Deno](https://github.com/alephjs/aleph.js/workflows/Aleph.js%20in%20Deno/badge.svg)](https://github.com/alephjs/aleph.js/actions?query=workflow%3A%22Aleph.js+in+Deno%22)
1010
[![nest badge](https://nest.land/badge.svg)](https://nest.land/package/aleph)
1111
[![Twitter Follow](https://img.shields.io/twitter/follow/alephjs?style=social)](https://twitter.com/intent/follow?screen_name=alephjs)
1212

cli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const helpMessage = `Aleph.js v${version}
1919
The React Framework in deno.
2020
2121
Docs: https://alephjs.org/docs
22-
Bugs: https://github.com/postui/aleph.js/issues
22+
Bugs: https://github.com/alephjs/aleph.js/issues
2323
2424
Usage:
2525
aleph <command> [...options]

egg.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "aleph",
33
"version": "0.2.19",
44
"description": "The React Framework in Deno.",
5-
"repository": "https://github.com/postui/aleph.js",
5+
"repository": "https://github.com/alephjs/aleph.js",
66
"entry": "./mod.ts",
77
"files": [
88
"./*.ts",
Binary file not shown.
Lines changed: 15 additions & 0 deletions
Loading
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import React, { ComponentType } from 'https://esm.sh/react'
2+
import { Head } from 'https://deno.land/x/aleph/mod.ts'
3+
4+
export default function App({ Page, pageProps }: { Page: ComponentType<any>, pageProps: any }) {
5+
return (
6+
<>
7+
<Head>
8+
<title>Hello World - Aleph.js</title>
9+
</Head>
10+
<Page {...pageProps} />
11+
</>
12+
)
13+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React, { useState } from 'https://esm.sh/react'
2+
3+
export default function Logo({ width = 75 }: { width?: number }) {
4+
const [height, setHeight] = useState(width)
5+
6+
7+
return (
8+
<img src="/logo.svg" width={width} height={height} title="Aleph.js" />
9+
)
10+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import { Import, useDeno } from 'https://deno.land/x/aleph/mod.ts'
2+
import React, { useState } from 'https://esm.sh/react'
3+
import Logo from '../components/logo.tsx'
4+
5+
export default function Home() {
6+
const [count, setCount] = useState(0)
7+
const version = useDeno(() => {
8+
return Deno.version
9+
})
10+
11+
return (
12+
<div className="page">
13+
<Import from="../style/index.less" />
14+
<p className="logo"><Logo /></p>
15+
<h1>Welcome to use <strong>Aleph.js</strong>!</h1>
16+
<p className="links">
17+
<a href="https://alephjs.org" target="_blank">Website</a>
18+
<span>&middot;</span>
19+
<a href="https://alephjs.org/docs/get-started" target="_blank">Get Started</a>
20+
<span>&middot;</span>
21+
<a href="https://alephjs.org/docs" target="_blank">Docs</a>
22+
<span>&middot;</span>
23+
<a href="https://github.com/alephjs/alephjs" target="_blank">Github</a>
24+
</p>
25+
<p className="counter">
26+
<span>Counter:</span>
27+
<strong>{count}</strong>
28+
<button onClick={() => setCount(n => n - 1)}>-</button>
29+
<button onClick={() => setCount(n => n + 1)}>+</button>
30+
</p>
31+
<p className="copyinfo">Built by Aleph.js in Deno v{version.deno}</p>
32+
</div>
33+
)
34+
}
Lines changed: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
* {
2+
margin: 0;
3+
padding: 0;
4+
border: none;
5+
outline: none;
6+
font: inherit;
7+
font-size: 100%;
8+
vertical-align: baseline;
9+
background: transparent;
10+
}
11+
12+
body {
13+
font-family: "Helvetica Neue", Helvetica, Arial sans-serif;
14+
font-size: 16px;
15+
}
16+
17+
main {
18+
display: flex;
19+
align-items: center;
20+
justify-content: center;
21+
height: 100vh;
22+
}
23+
24+
.page {
25+
h1 {
26+
margin: 0;
27+
line-height: 1.5;
28+
font-size: 18px;
29+
font-weight: 400;
30+
text-align: center;
31+
color: #000;
32+
33+
strong {
34+
font-weight: 700;
35+
}
36+
}
37+
38+
p {
39+
margin: 0;
40+
line-height: 1.5;
41+
text-align: center;
42+
color: #333;
43+
}
44+
45+
.logo + p {
46+
margin-top: 6px;
47+
}
48+
49+
.links {
50+
span, a {
51+
display: inline-block;
52+
vertical-align: middle;
53+
}
54+
span {
55+
color: #999;
56+
}
57+
a {
58+
margin: 0 9px;
59+
color: #777;
60+
text-decoration: none;
61+
border-bottom: 1px dashed #ccc;
62+
63+
&:hover {
64+
color: #333;
65+
border-bottom-color: transparent;
66+
}
67+
}
68+
}
69+
70+
.counter {
71+
display: flex;
72+
justify-content: center;
73+
align-items: center;
74+
width: 270px;
75+
height: 48px;
76+
margin: 30px auto 0;
77+
border: 1px solid #eee;
78+
border-radius: 6px;
79+
transition: all 0.15s ease-in;
80+
81+
&:hover {
82+
border-color: #ccc;
83+
}
84+
85+
strong {
86+
display: inline-block;
87+
width: 48px;
88+
font-weight: 600;
89+
text-align: center;
90+
}
91+
92+
button {
93+
display: line-flex;
94+
align-items: center;
95+
justify-content: center;
96+
width: 20px;
97+
height: 20px;
98+
border-radius: 4px;
99+
box-shadow: 0 0 1px rgba(0, 0, 0, 0.5);
100+
line-height: 1;
101+
font-size: 12px;
102+
font-family: Courier, monospace;
103+
font-weight: 600;
104+
color: #666;
105+
transition: all 0.1s ease-in-out;
106+
cursor: pointer;
107+
108+
&:hover {
109+
color: #111;
110+
box-shadow: 0 0 2px rgba(0, 0, 0, 0.75);
111+
}
112+
}
113+
button + button {
114+
margin-left: 9px;
115+
}
116+
}
117+
118+
.copyinfo {
119+
margin-top: 30px;
120+
font-size: 14px;
121+
color: #999;
122+
}
123+
}

examples/hello-world/import_map.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"imports": {
3-
"https://deno.land/x/aleph/": "https://denopkg.com/postui/aleph.js/"
3+
"https://deno.land/x/aleph/": "https://denopkg.com/alephjs/aleph.js/"
44
}
55
}

0 commit comments

Comments
 (0)