Skip to content
This repository has been archived by the owner on Apr 19, 2021. It is now read-only.

Commit

Permalink
[docs] Elm in Gitpod (#508)
Browse files Browse the repository at this point in the history
Co-authored-by: Geoffrey Huntley <[email protected]>
  • Loading branch information
Sean Hellum and ghuntley authored Mar 23, 2021
1 parent 39adcdb commit 89199e3
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 1 deletion.
Binary file added src/docs/images/ElmExtensionDemo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/docs/languages-and-frameworks.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,4 @@ Below is a list of language and framework specific tips & tricks.
- [Kotlin](/docs/languages/kotlin)
- [Pandas](/docs/languages/python/#pandas)
- [Deno](/docs/languages/deno)
- [Elm](/docs/languages/elm)
59 changes: 59 additions & 0 deletions src/docs/languages/elm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Elm in Gitpod

It's easy to set up Elm in Gitpod.

## Setting up the Dockerfile

Add a Dockerfile to your project as [.gitpod.Dockerfile](https://www.gitpod.io/docs/config-docker/):

```Dockerfile
# Install Elm
RUN curl -L -o elm.gz https://github.com/elm/compiler/releases/download/0.19.1/binary-for-linux-64-bit.gz \
&& gunzip elm.gz \
&& chmod +x elm \
&& sudo mv elm /usr/local/bin/

# Formats Elm code according to a standard set of rules based on the official Elm Style Guide
RUN npm install -g elm-format

# Unit and fuzz tests for Elm code.
RUN npm install -g elm-test

# Analyse your Elm code, identify deficiencies and apply best practices.
RUN npm install -g elm-analyse
```


## Example Repositories

Here are a few Elm example projects that are already automated with Gitpod:

<div class="table-container">

| Repository | Description | Try It |
|------------|--------------|--------|
|[elm-spa-example](https://github.com/svenefftinge/elm-spa-example) | A Single Page Application written in Elm | [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/svenefftinge/elm-spa-example)

</div>

## VSCode Extensions

### Elm

![Demo of the Elm extension](../images/ElmExtensionDemo.png)

This extension adds many features:

- Peek/Goto definition
- [Intellisense](https://code.visualstudio.com/docs/editor/intellisense)/Code completion
- Hover documentation
- Autoformatting
- Rename symbols

To add this VSCode extension to your repository please add the following to your [.gitpod.yml](https://www.gitpod.io/docs/config-gitpod-file/) file

```yaml
vscode:
extensions:
- [email protected]:rb3k4mPelyC4Fqod9UBvvA==
```
7 changes: 6 additions & 1 deletion src/docs/menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,11 @@ export const MENU: MenuEntry[] = [
"Deno",
"languages/deno"
),
M(
"Elm",
"languages/elm"
),

]
),
M(
Expand Down Expand Up @@ -346,4 +351,4 @@ export function getMenuContext(slug: string, menu: MenuEntry[] = MENU, context:
}
}
return context;
}
}

0 comments on commit 89199e3

Please sign in to comment.