Skip to content

Commit

Permalink
Merge pull request #28 from alephjs/swc
Browse files Browse the repository at this point in the history
New Compiler&Bundler
  • Loading branch information
ije authored Jan 22, 2021
2 parents 0456c9d + af78991 commit 659337e
Show file tree
Hide file tree
Showing 125 changed files with 9,359 additions and 6,672 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/aleph_in_deno.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ jobs:
with:
deno-version: v1.x

- name: Cache std modules
run: deno cache std.ts
- name: Cache deps modules
run: deno cache deps.ts

- name: Run tests
run: deno test -A --unstable
run: deno test -A --unstable --location "http://localhost/"
37 changes: 37 additions & 0 deletions .github/workflows/swc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: compiler

on:
push:
branches: [master]
pull_request:
branches: [master]

jobs:
test:
runs-on: ${{ matrix.os }} # runs a test on macOS, Windows and Ubuntu

strategy:
matrix:
os: [macOS-latest, windows-latest, ubuntu-latest]

steps:
- name: Setup repo
uses: actions/checkout@v2

- name: Setup rust
uses: hecrj/setup-rust-action@v1
with:
rust-version: stable

- name: Setup wasm-pack
uses: jetli/[email protected]
with:
version: latest

- name: Run tests
run: cd compiler && cargo test --all
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.DS_Store
Thumbs.db
compiler/target/
compiler/pkg/
.aleph/
dist/
swc/target/
swc/pkg/
3 changes: 2 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"recommendations": [
"denoland.vscode-deno"
"denoland.vscode-deno",
"rust-lang.rust"
]
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"files.eol": "\n",
"files.trimTrailingWhitespace": true,
"typescript.format.semicolons": "remove",
"[javascript]": {
"editor.defaultFormatter": "vscode.typescript-language-features"
},
Expand Down
38 changes: 28 additions & 10 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,32 +1,50 @@
# Contributing to Aleph.js

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

## Code of Conduct

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

## Development Setup

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).
You will need [Deno](https://deno.land/) 1.7+.

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

```bash
deno run -A --unstable --import-map=import_map.json cli.ts ./examples/hello-world -L debug
# ssr
deno run -A --unstable --import-map=import_map.json cli.ts dev ./examples/hello-world -L debug
# ssg
deno run -A --unstable --import-map=import_map.json cli.ts build ./examples/hello-world -L debug
```

## Testing

Run all tests:

```bash
deno test -A --unstable
deno test -A
```

## Contributing to Documentation
## Project Structure

- **/cli** command code
- **/compiler** compiler in rust with swc
- **/framework** framework code
- **/design** design drawings and assets
- **/examples** examples
- **/plugins** official plugins
- **/server** server code
- **/shared** shared code
- **/test** testings
- **/vendor** packages from npm

You are welcome to improve our [documentation](https://alephjs.org/docs).
## Code of Conduct

All contributors are expected to follow our [Code of Conduct](CODE_OF_CONDUCT.md).
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2020 postUI Lab.
Copyright (c) 2020-2021 postUI Lab.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Aleph.js works in **Deno**, a *simple*, *modern* and *secure* runtime for JavaSc
import React from "https://esm.sh/[email protected]"
import Logo from "../components/logo.tsx"

export default function Home() {
export default function App() {
return (
<div>
<Logo />
Expand All @@ -33,6 +33,7 @@ export default function Home() {

- Zero Config
- Typescript in Deno
- High Performance Comilper
- ES Module Ready
- Import Maps
- HMR with Fast Refresh
Expand Down
233 changes: 0 additions & 233 deletions aleph.ts

This file was deleted.

Loading

0 comments on commit 659337e

Please sign in to comment.