Skip to content

Commit 0548bfd

Browse files
authored
Merge pull request #15 from rubas/patch-1
Doc: Consistent hierarchy & add Deps to .merlin
2 parents 8a08043 + a252382 commit 0548bfd

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

docs/index.html

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -130,22 +130,22 @@
130130
131131
## Editor Support
132132
133-
#### Prepare Your Editor
133+
### Prepare Your Editor
134134
135135
Configure your editor to load the `Reason` plugins. See the instructions for
136136
[Atom](http://facebook.github.io/reason/tools.html#merlin-atom) and
137137
[Vim](https://github.com/facebook/reason/tree/master/editorSupport/VimReason)
138138
and [emacs](https://github.com/facebook/reason/tree/master/editorSupport/emacs).
139139
140-
#### IDE support included.
140+
### IDE support included.
141141
142142
The editor configurations above prepare your editor to load the *actual* editor
143143
support, from the `ReasonProject` build. The only thing we need is to make sure the `PATH`
144144
contains all the important stuff from `ReasonProject`'s build at the time we launch
145145
our editor. There are two approaches: one continues to avoid global variables
146146
(as we've done so far), and the other doesn't.
147147
148-
##### Avoiding Global Paths
148+
#### Avoiding Global Paths
149149
150150
You can continue to develop entirely in the isolated sandbox without polluting
151151
global environment variables, by opening your editor within the sandbox
@@ -168,7 +168,7 @@
168168
> commenting out any part in your `bashrc` that sources opam environments. We
169169
> will come up with a long term solution at some point.
170170
171-
##### Using Global Paths
171+
#### Using Global Paths
172172
173173
Pure sandboxed based development doesn't always work for certain workflows.
174174
(prefixing *all* commands with `npm run` may not work well). In that case, you
@@ -194,7 +194,7 @@
194194
[this repo](https://github.com/yunxing/opam-npm/) and the package will automatically
195195
be ported (as soon as the daemon picks it up).
196196
197-
##### Add Another Dependency
197+
#### Add Another Dependency
198198
199199
**Option `1`:** Install a dependency into the project sandbox, and use `--save`
200200
so that your `package.json` is updated.
@@ -226,6 +226,8 @@
226226
need to configure the `reasonBuild` entry in `package.json` to add the `-pkg
227227
dependencyPackage`. Consult your dependency's docs.
228228
229+
Don't forget to add your new dependency also to the `.merlin` (configuration)[https://github.com/ocaml/merlin/wiki/emacs-from-scratch#using-libraries] with `PKG dependencyPackage` so that your editor knows about it too.
230+
229231
### Add Your Own Scripts
230232
231233
`npm` allows `scripts` to be specified in your project's `package.json`. These
@@ -290,7 +292,7 @@
290292
> Note: We will soon make it impossible for these kinds of conflicts to occur.
291293
292294
293-
#### Debugging Failed Dependencies
295+
### Debugging Failed Dependencies
294296
295297
When `npm install` fails to install one of your dependencies, it's typically
296298
because a `postinstall` step of a package has failed. Read the logs to
@@ -300,7 +302,7 @@
300302
`@opam-alpha/qcheck` package failed to install. Let's recreate the failure so
301303
we can debug it.
302304
303-
#####Do a dry run:
305+
####Do a dry run:
304306
Let's see what an `npm install` for this package *would* install. The `--dry-run`
305307
flag avoids actually installing anything.
306308
@@ -321,7 +323,7 @@
321323
> Note: Sometimes it won't traverse `git` dependencies to find all the potentially installed
322324
package. That's okay.
323325
324-
###### Install Source Without Building
326+
##### Install Source Without Building
325327
So we want to install that now, but *without* executing the install scripts so we
326328
pass the `--ignore-scripts` flag. Without that flag, it would fail when running
327329
the scripts again, and then remove the package again!
@@ -332,7 +334,7 @@
332334
333335
This will just install the source code, and let us know what it actually installed.
334336
335-
###### Try The Build Manually, In Place
337+
##### Try The Build Manually, In Place
336338
Now, make sure `npm` didn't do something weird with installing new versions of package
337339
that didn't show up in the dry run, and make sure it installed things
338340
as flat as possible in `node_modules`, as opposed to nesting `node_modules`

0 commit comments

Comments
 (0)