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

Commit 7f4794f

Browse files
committed
Merge branch 'master' of https://github.com/alephjs/aleph.js
2 parents 2550e59 + c8e2bcd commit 7f4794f

File tree

126 files changed

+9363
-6753
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

126 files changed

+9363
-6753
lines changed

.github/workflows/aleph_in_deno.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ jobs:
2828
with:
2929
deno-version: v1.x
3030

31-
- name: Cache std modules
32-
run: deno cache std.ts
31+
- name: Cache deps modules
32+
run: deno cache deps.ts
3333

3434
- name: Run tests
35-
run: deno test -A --unstable
35+
run: deno test -A --unstable --location "http://localhost/"

.github/workflows/swc.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
name: compiler
7+
8+
on:
9+
push:
10+
branches: [master]
11+
pull_request:
12+
branches: [master]
13+
14+
jobs:
15+
test:
16+
runs-on: ${{ matrix.os }} # runs a test on macOS, Windows and Ubuntu
17+
18+
strategy:
19+
matrix:
20+
os: [macOS-latest, windows-latest, ubuntu-latest]
21+
22+
steps:
23+
- name: Setup repo
24+
uses: actions/checkout@v2
25+
26+
- name: Setup rust
27+
uses: hecrj/setup-rust-action@v1
28+
with:
29+
rust-version: stable
30+
31+
- name: Setup wasm-pack
32+
uses: jetli/[email protected]
33+
with:
34+
version: latest
35+
36+
- name: Run tests
37+
run: cd compiler && cargo test --all

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.DS_Store
22
Thumbs.db
3+
compiler/target/
4+
compiler/pkg/
35
.aleph/
46
dist/
5-
swc/target/
6-
swc/pkg/

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"recommendations": [
3-
"denoland.vscode-deno"
3+
"denoland.vscode-deno",
4+
"rust-lang.rust"
45
]
56
}

.vscode/settings.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"files.eol": "\n",
33
"files.trimTrailingWhitespace": true,
4+
"typescript.format.semicolons": "remove",
45
"[javascript]": {
56
"editor.defaultFormatter": "vscode.typescript-language-features"
67
},

CONTRIBUTING.md

Lines changed: 28 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,50 @@
11
# Contributing to Aleph.js
22

3-
Welcome, and thank you for taking time in contributing to Aleph.js!
3+
Welcome, and thank you for taking time in contributing to Aleph.js! You can improve Aleph.js in different ways:
44

5-
## Code of Conduct
6-
7-
All contributors are expected to follow our [Code of Conduct](CODE_OF_CONDUCT.md).
5+
- ∆ add new features
6+
- ✘ bugfix
7+
- ✔︎ review code
8+
- ☇ write plugins
9+
- 𝔸 improve our [documentation](https://github.com/alephjs/alephjs.org)
810

911
## Development Setup
1012

11-
You will need [Deno](https://deno.land/) 1.5+ and [VS Code](https://code.visualstudio.com/) with [deno extension](https://marketplace.visualstudio.com/items?itemName=denoland.vscode-deno).
13+
You will need [Deno](https://deno.land/) 1.7+.
1214

1315
1. Fork this repository to your own GitHub account.
1416
2. Clone the repository to your local device.
1517
3. Create a new branch `git checkout -b BRANCH_NAME`.
16-
4. Change code then run examples.
18+
4. Change code then run our examples.
1719

1820
```bash
19-
deno run -A --unstable --import-map=import_map.json cli.ts ./examples/hello-world -L debug
21+
# ssr
22+
deno run -A --unstable --import-map=import_map.json cli.ts dev ./examples/hello-world -L debug
23+
# ssg
24+
deno run -A --unstable --import-map=import_map.json cli.ts build ./examples/hello-world -L debug
2025
```
2126

2227
## Testing
2328

2429
Run all tests:
2530

2631
```bash
27-
deno test -A --unstable
32+
deno test -A
2833
```
2934

30-
## Contributing to Documentation
35+
## Project Structure
36+
37+
- **/cli** command code
38+
- **/compiler** compiler in rust with swc
39+
- **/framework** framework code
40+
- **/design** design drawings and assets
41+
- **/examples** examples
42+
- **/plugins** official plugins
43+
- **/server** server code
44+
- **/shared** shared code
45+
- **/test** testings
46+
- **/vendor** packages from npm
3147

32-
You are welcome to improve our [documentation](https://alephjs.org/docs).
48+
## Code of Conduct
49+
50+
All contributors are expected to follow our [Code of Conduct](CODE_OF_CONDUCT.md).

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2020 postUI Lab.
3+
Copyright (c) 2020-2021 postUI Lab.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 6 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -2,71 +2,19 @@
22

33
# Aleph.js
44

5-
Aleph.js (or **Aleph** or **א**, /ˈɑːlɛf/) is a React Framework in [Deno](https://deno.land), inspired by [Next.js](https://nextjs.org).
6-
<br>
5+
Aleph.js (or **Aleph** or **א**, /ˈɑːlɛf/) is a full-stack framework in [Deno](https://deno.land).
6+
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

99
[![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)
10-
[![nest badge](https://nest.land/badge.svg)](https://nest.land/package/aleph)
1110
[![Chat](https://img.shields.io/discord/775256646821085215?color=%23008181&label=Chat&labelColor=%23111&logo=discord&logoColor=%23aaaaaa)](https://discord.gg/pWGdS7sAqD)
1211
[![Twitter Follow](https://img.shields.io/twitter/follow/alephjs?style=social)](https://twitter.com/intent/follow?screen_name=alephjs)
1312

14-
Different with Next.js, Aleph.js don't need **webpack** or other bundler since it uses the **ESM** imports syntax. Every module only needs to be compiled once and then cached on the disk. When a module changes, Aleph.js just needs to re-compile that single module, there's no time wasted to *re-bundle* every changes, and instantly updates in the browser by **HMR** (Hot Module Replacement) with **React Fast Refresh**.
15-
16-
Aleph.js works in **Deno**, a *simple*, *modern* and *secure* runtime for JavaScript and TypeScript. No `package.json` and `node_modules` directory needed, all dependencies are imported as URL and managed by Aleph.js:
17-
18-
```jsx
19-
import React from "https://esm.sh/[email protected]"
20-
import Logo from "../components/logo.tsx"
21-
22-
export default function Home() {
23-
return (
24-
<div>
25-
<Logo />
26-
<h1>Hello World!</h1>
27-
</div>
28-
)
29-
}
30-
```
31-
32-
### Features
33-
34-
- Zero Config
35-
- Typescript in Deno
36-
- ES Module Ready
37-
- Import Maps
38-
- HMR with Fast Refresh
39-
- File-system Routing
40-
- APIs Routing
41-
- Built-in Markdown Page
42-
- Built-in CSS(Less) Support
43-
- SSR/SSG
44-
45-
### Installation
46-
47-
```bash
48-
deno install -A -f -n aleph https://deno.land/x/[email protected]/cli.ts
49-
```
50-
51-
### Usage
52-
53-
```bash
54-
# create a new app
55-
aleph init hello
56-
cd hello
57-
58-
# start the app in `development` mode
59-
aleph dev
60-
61-
# start the app in `production` mode
62-
aleph start
63-
64-
# build the app to a static site (SSG)
65-
aleph build
13+
### Supported Frameworks
6614

67-
# more usages
68-
aleph -h
69-
```
15+
- React
16+
- Alef Component (WIP)
17+
- Vuejs (Coming)
7018

7119
### Documentation
7220

0 commit comments

Comments
 (0)