1
1
# Getting started
2
2
3
- Get up and running with Melange in no time!
3
+ Get up and running with Melange in no time! Below you will find the two main
4
+ ways to get started with Melange:
5
+ 1 . Automated, using
6
+ [ create-melange-app] ( https://github.com/dmmulroy/create-melange-app )
7
+ 2 . Manually, using
8
+ [ melange-opam-template] ( https://github.com/melange-re/melange-opam-template )
9
+
10
+ ## Getting started (automated): ` create-melange-app `
11
+
12
+ If you prefer an automated way to install the Melange toolchain, you can use
13
+ [ create-melange-app] ( https://github.com/dmmulroy/create-melange-app ) to start a
14
+ new project. To do so, run these commands:
15
+
16
+ ``` bash
17
+ npm create melange-app@latest
18
+ npm run dev
19
+ ```
20
+
21
+ ## Getting started (manual): ` melange-opam-template `
22
+
23
+ If you prefer manually installing the toolchain, follow the instructions below.
4
24
5
- ## Install a package manager
25
+ ### Install a package manager
6
26
7
27
To work with Melange, you need to install a package manager compatible with
8
28
OCaml. If you are not sure which one to use, we recommend
@@ -14,19 +34,17 @@ Instructions for installing opam on different operating systems can be found at
14
34
the opam [ install page] ( https://opam.ocaml.org/doc/Install.html ) , and you can
15
35
find [ a whole section about it] ( package-management.md ) on this website.
16
36
17
- ## Template
37
+ ### Get the template
18
38
19
- The easiest way to get started with Melange is by using the
20
- [ melange-opam-template] ( https://github.com/melange-re/melange-opam-template ) .
21
- You can clone it from [ this
39
+ You can clone ` melange-opam-template ` from [ this
22
40
link] ( https://github.com/melange-re/melange-opam-template/generate ) , and follow
23
41
the instructions in the [ readme
24
42
file] ( https://github.com/melange-re/melange-opam-template/blob/main/README.md )
25
43
to configure the [ local opam
26
44
switch] ( https://opam.ocaml.org/blog/opam-local-switches/ ) and download the
27
45
necessary dependencies to build the project.
28
46
29
- ## Editor integration
47
+ ### Editor integration
30
48
31
49
One of the goals of Melange is to remain compatible with OCaml. One of the major
32
50
benefits of this compatibility is that developers working on Melange projects
@@ -49,12 +67,12 @@ are several options available. You can read about them in the [editor setup
49
67
page] ( http://ocamlverse.net/content/editor_setup.html ) of the OCamlverse
50
68
documentation site.
51
69
52
- ## Alternative package managers (experimental)
70
+ ### Alternative package managers (experimental)
53
71
54
72
Melange can also be used with other package managers. The following instructions
55
73
apply to [ Nix] ( #nix ) and [ esy] ( #esy ) .
56
74
57
- ### [ Nix] ( https://nixos.org/ )
75
+ #### [ Nix] ( https://nixos.org/ )
58
76
59
77
Melange provides an overlay that can be:
60
78
@@ -105,7 +123,7 @@ Make sure [Nix](https://nixos.org/download.html) is installed. The following
105
123
106
124
To enter a Melange development shell, run ` nix develop -c $SHELL ` .
107
125
108
- ### [ esy] ( https://esy.sh/ )
126
+ #### [ esy] ( https://esy.sh/ )
109
127
110
128
First, make sure ` esy ` is
111
129
[ installed] ( https://esy.sh/docs/en/getting-started.html#install-esy ) . `npm i -g
0 commit comments