You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-5Lines changed: 16 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,16 @@ Try PureScript
3
3
4
4
[Try PureScript](https://try.purescript.org) is an online PureScript code editor for quickly experimenting with PureScript code snippets and ideas.
5
5
6
-
### Features:
6
+
## How to Add a New Backend
7
+
8
+
- Create a `bower.json`/`psc-package.json` file with all the dependencies you want to be available for the library backend and optionally an extra `Try` module if you want. [Example PR](https://github.com/purescript/trypurescript/pull/84/files)
9
+
- Write an example in a github gist and name it `Main.purs`. [Example Gist](https://gist.github.com/ff1e87f0872d2d891e77d209d8f7706d)
10
+
- add a backend button and a backend option in `index.html` and `index.js` respectively. [Example PR](https://github.com/purescript/trypurescript/pull/85/files)
11
+
- Note to link the gist from the previous bullet in the `mainGist` field in `index.js`
12
+
- Ask phil to update the `core` main gist to link to the new backend
13
+
14
+
15
+
## Features:
7
16
8
17
- Writing code using the [Ace Editor](http://ace.c9.io)
9
18
- Automatic compilation
@@ -16,19 +25,19 @@ Try PureScript
16
25
- (_Note: These Gists are not associated with your GitHub account and are visible to anyone with a link to them_)
17
26
18
27
19
-
###Control Features via the Query String
28
+
## Control Features via the Query String
20
29
21
30
Most of these features can be controlled not only from the toolbar, but also using the [query parameters](https://en.wikipedia.org/wiki/Query_string):
22
31
23
32
-**Load From Gist**: Load PureScript code from Gist id using the `gist` parameter
24
-
- Example: `gist=37c3c97f47a43f20c548` will load the code from this Gist
33
+
- Example: `gist=37c3c97f47a43f20c548` will load the code from this Gist if the file was named `Main.purs`
25
34
26
35
-**View Mode**: Control the view mode using the `view` parameter
27
36
- Options are: `code`, `output`, `both`
28
37
- Example: `view=output` will only display the output
29
38
30
39
-**Backend**: Control which backend will compile your code using the `backend` parameter
- Example: `backend=thermite` will use the thermite backend
33
42
34
43
-**Auto Compile**: Automatic compilation can be turned off using the `compile` parameter
@@ -44,8 +53,10 @@ Most of these features can be controlled not only from the toolbar, but also usi
44
53
- Example: `session=9162f098-070f-4053-60ea-eba47021450d` (Note: will probably not work for you)
45
54
- When used with the `gist` query parameter the code will be loaded from the Gist and not the session
46
55
47
-
###Packages
56
+
## Packages
48
57
49
58
- The packages set and compiler version for Try-PureScript can be viewed [here](https://github.com/purescript/trypurescript/tree/master/staging/core/psc-package.json).
50
59
51
60
- The packages set and compiler version for Try-Thermite can be viewed [here](https://github.com/paf31/try-thermite/blob/gh-pages/staging/psc-package.json).
0 commit comments