Skip to content

Commit 659337e

Browse files
authored
Merge pull request #28 from alephjs/swc
New Compiler&Bundler
2 parents 0456c9d + af78991 commit 659337e

File tree

125 files changed

+9359
-6672
lines changed

Some content is hidden

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

125 files changed

+9359
-6672
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Aleph.js works in **Deno**, a *simple*, *modern* and *secure* runtime for JavaSc
1919
import React from "https://esm.sh/[email protected]"
2020
import Logo from "../components/logo.tsx"
2121

22-
export default function Home() {
22+
export default function App() {
2323
return (
2424
<div>
2525
<Logo />
@@ -33,6 +33,7 @@ export default function Home() {
3333

3434
- Zero Config
3535
- Typescript in Deno
36+
- High Performance Comilper
3637
- ES Module Ready
3738
- Import Maps
3839
- HMR with Fast Refresh

aleph.ts

Lines changed: 0 additions & 233 deletions
This file was deleted.

0 commit comments

Comments
 (0)