Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(dev): codespaces re-org and update #468

Merged
merged 9 commits into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN apt-get update \
curl \
uuid-runtime \
&& rm -rf /var/lib/apt/lists/* \
&& mkdir -p /usr/lib/elide \
&& mkdir -p /usr/lib/elide /home/vscode/.elide \
&& echo "Installing Elide..." \
&& curl -sSL elide.sh | bash -s - --install-dir=/usr/lib/elide \
&& ln -s /usr/lib/elide/elide /bin/elide \
Expand Down
69 changes: 69 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
<p align="center">
<a href="https://github.com/elide-dev">
<img src="https://static.elide.dev/assets/org-profile/creative/elide-banner-purple.png" alt="Elide" height=240 />
</a>
</p>

## Elide + Codespaces

This GitHub Codespace comes pre-installed with the latest version of [Elide](https://elide.dev).

## Stuff to try

**Your terminal should already be open at the bottom of your screen.** We have already taken care of running the first command, `elide --help`, for you. Here's some more stuff you can try.

### Basic commands

**To see runtime info:**
```
elide info
```

**To verify working installation:**
```
elide selftest
```

### JavaScript

**To run a JavaScript terminal:**
```
elide shell
```

**Encode some JSON:**
```javascript
JSON.stringify({x: 5})
```

**To see `.env` environment:**
```python
JSON.stringify(process.env)
```

**Generate a UUID:**
```javascript
crypto.randomUUID()+""
```

**Parse a URL and print the host:**
```javascript
new URL("https://google.com").host
```

**To run a JavaScript server:**
```
elide serve tools/scripts/server.js
```

### Python

**To run a Python terminal:**
```
elide shell --python
```

**To see `.env` environment:**
```python
import os; os.environ
```
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "elide",
"name": "Elide: Dev (Engineering Team)",
"build": {
"dockerfile": "Dockerfile"
},
Expand Down
79 changes: 44 additions & 35 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,48 @@
{
"name": "Elide",
"build": {
"dockerfile": "Dockerfile",
},
"runArgs": ["--init", "--privileged"],
"overrideCommand": false,
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/github-cli:1": {},
"ghcr.io/devcontainers/features/go:1": {"version": "1.20"},
"ghcr.io/devcontainers/features/sshd:1": {"version": "latest"},
"ghcr.io/devcontainers/features/docker-from-docker:1": {}
},
"customizations": {
"vscode": {
"settings": {
"netbeans.jdkhome": "/usr/lib/gvm",
"java.completion.enabled": true,
"java.debug.settings.enableRunDebugCodeLens": true,
"java.test.editor.enableShortcuts": true
"name": "Elide",
"build": {
"dockerfile": "Dockerfile"
},
"runArgs": ["--init", "--privileged"],
"postAttachCommand": "echo 'ELIDE_CODESPACE=true' > .env && touch package.json && code .devcontainer/README.md && clear && elide --help",
"overrideCommand": false,
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/docker-from-docker:1": {}
},
"customizations": {
"codespaces": {
"openFiles": [
".devcontainer/README.md"
]
},
"extensions": [
"asf.apache-netbeans-java",
"mathiasfrohlich.kotlin",
"github.codespaces",
"github.copilot",
"ms-azuretools.vscode-docker",
"ms-vscode-remote.remote-containers",
"ms-vscode.vscode-typescript-tslint-plugin",
"redhat.vscode-yaml",
"sourcegraph.sourcegraph",
"oracle-labs-graalvm.graalvm",
"oracle-labs-graalvm.graalvm-pack",
"oracle-labs-graalvm.dashboard"
],
"vscode": {
"settings": {
"java.completion.enabled": true,
"java.debug.settings.enableRunDebugCodeLens": true,
"java.test.editor.enableShortcuts": true,
"explorer.autoReveal": "focusNoScroll",
"terminal.integrated.gpuAcceleration": "on",
"terminal.integrated.enableImages": true,
"terminal.integrated.customGlyphs": true,
"workbench.editorAssociations": {
"*.md": "vscode.markdown.preview.editor"
}
},
"extensions": [
"asf.apache-netbeans-java",
"mathiasfrohlich.kotlin",
"github.codespaces",
"github.copilot",
"ms-azuretools.vscode-docker",
"ms-vscode-remote.remote-containers",
"ms-vscode.vscode-typescript-tslint-plugin",
"redhat.vscode-yaml",
"sourcegraph.sourcegraph",
"oracle-labs-graalvm.graalvm",
"oracle-labs-graalvm.graalvm-pack",
"oracle-labs-graalvm.dashboard"
]
}
}
}
}
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
<p align="center">
<a href="https://github.com/elide-dev/v3">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="./creative/logo/logo-wide-1200-w-r2.png">
<img src="./creative/logo/logo-wide-1200-w-r2.png" height="300">
</picture>
<a href="https://github.com/elide-dev">
<img src="https://static.elide.dev/assets/org-profile/creative/elide-banner-purple.png" alt="Elide" />
</a>
</p>

Expand Down Expand Up @@ -35,7 +32,7 @@ Elide is a cloud-first polyglot runtime for developing fast web applications. It
> [!IMPORTANT]
> Elide is still in alpha, some features are not fully supported and others may fail on certain environments.

## Using the runtime binaries
## Installation

You can install the runtime by running:

Expand All @@ -45,6 +42,22 @@ curl -sSL --tlsv1.2 elide.sh | bash -s -

After installation, you can run `elide help` or `elide info` to see more information.

## Other ways to try Elide

You can also use Elide in a container, or in a GitHub Codespace.

### Using Elide via Docker

```
docker run --platform linux/amd64 --rm -it ghcr.io/elide-dev/elide --help
```

### Using Elide via GitHub Codespaces

We provide a [GitHub Codespace](https://github.com/features/codespaces) with Elide pre-installed. You can click below to try it out, right from your browser:

[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/elide-dev/elide?devcontainer_path=.devcontainer%2Fdevcontainer.json)

## Features

The Elide CLI supports JavaScript out of the box, and includes experimental support for Python, while more languages such as Ruby are planned for future releases.
Expand Down
Loading