Skip to content

Commit 321bca5

Browse files
committed
[Docs] Try Gitbook!
The docs pages reminded me of the [Gitbook](https://github.com/GitbookIO/gitbook) format, except with the latter, you wouldn't need to maintain anything yourself. Here's an example of such doc: http://redux.js.org `npm run watch` is all you need to set up a watcher that live reflects your changes to localhost:4000. `npm run build` to publish into _book, which I put into .gitignore, as I'm not sure how publishing to gh-pages work.
1 parent 92602a3 commit 321bca5

14 files changed

+60
-278
lines changed

docs/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1+
.*
12
node_modules
2-
dist/*.html
3+
_book

docs/Create-a-simple-example-with-NPM.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,21 @@ echo "{}" > package.json
1010

1111
First, Install BuckleScript.
1212
(For more advacned settings, please read
13-
[Installation](./Installation))
13+
[Installation](./Installation.md))
1414

1515

1616

1717
```sh
18-
npm install bs-platform --save
18+
npm install bs-platform --save
1919
```
2020

21-
Second, create a file called `hello.ml`,
21+
Second, create a file called `hello.ml`,
2222

2323
```js
2424
echo 'let _ = Js.log "hello bucklescript!"' > hello.ml
2525
```
2626

27-
Third, build and run
27+
Third, build and run
2828

2929
```
3030
`npm bin`/bsc -c hello.ml

docs/Installation.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22

33
To use BuckleScript, you need both, a specific version of the OCaml compiler (tweaked to make BuckleScript possible), and the BuckleScript software itself. The instructions below show how to install both of these using standard package managers as well as how to build from source for Unix/Linux systems. Build directions will be updated once Windows systems are supported.
44

5-
## Default installation procedure (using package managers)
5+
## Default installation procedure (using package managers)
66

7-
### 1. OCaml compiler from opam (optional)
7+
### 1. OCaml compiler from opam (optional)
88

9-
When working with OCaml we recommend using [opam](https://opam.ocaml.org) package manager, available [here](https://opam.ocaml.org/doc/Install.html). You will benefit from the existing OCaml ecosystem.
9+
When working with OCaml we recommend using [opam](https://opam.ocaml.org) package manager, available [here](https://opam.ocaml.org/doc/Install.html). You will benefit from the existing OCaml ecosystem.
1010

1111
Once you have `opam` installed, ask `opam` to switch to using our version of the compiler:
1212

1313
```sh
1414
opam update
1515
opam switch 4.02.3+buckle-1
16-
eval `opam config env`
16+
eval `opam config env`
1717
```
1818

1919
> This step is optional. npm installation will build the compiler from source if not installed from opam
@@ -26,7 +26,7 @@ The standard npm package management tool can be used to install BuckleScript. If
2626
npm install --save bs-platform
2727
```
2828

29-
## Advanced installation procedure (from source)
29+
## Advanced installation procedure (from source)
3030

3131
BuckleScript has very little dependencies and building from source can easily be done.
3232

@@ -71,4 +71,4 @@ MODULE_FLAGS='-js-module commonjs' make world
7171
MODULE_FLAGS='-js-module goog:buckle' make world
7272
```
7373

74-
Also see [Create a simple example with npm](./Create-a-simple-example-with-npm.md)
74+
Also see [Create a simple example with npm](./Create-a-simple-example-with-NPM.md)
File renamed without changes.

docs/SUMMARY.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
* [Home](./README.md)
2+
3+
* [Playground](https://bloomberg.github.io/bucklescript/js-demo)
4+
5+
* Get Started
6+
* [Installation](./Installation.md)
7+
* [Create a simple example with NPM](./Create-a-simple-example-with-NPM.md)
8+
* [NPM Support](./NPM-Support.md)
9+
10+
* BuckleScript Basics
11+
* [FAQ](./FAQ.md)
12+
* [About OCaml](https://ocaml.org/)
13+
* [Compiler options](./Compiler-options.md)
14+
* [How to adapt your build system](./How-to-adapt-your-build-system.md)
15+
* [Extensions to OCaml Language](./Extensions-to-OCaml-Language.md)
16+
* [Semantic differences from other backends](./Semantic-differences-from-other-backends.md)
17+
* [JavaScript target versions](./JavaScript-target-versions.md)
18+
19+
20+
* BuckleScript Overview
21+
* [Compiler overview](./Compiler-overview.md)
22+
23+
* BuckleScript FFI
24+
* [Runtime representation](./Runtime-representation.md)
25+
* [Curry and Uncurry functions](./Curry-and-Uncurry-functions.md)
26+
* [JS call OCaml](./JS-call-OCaml.md)
27+
* [OCaml call JS](./OCaml-call-JS.md)
28+
* [Experimental support of typescript](./Experimental-support-of-typescript.md)
29+
* [Unsupported IO primitives](./Unsupported-IO-primitives.md)
30+
31+
* Contributions
32+
* [Github Link](https://github.com/bloomberg/bucklescript)
33+
* [Dev mode How to](./Dev-mode-How-to.md)
34+
* [Help move runtime functions from OCaml to Javascript](./Help-move-runtime-functions-from-OCaml-to-Javascript.md)
35+
36+
* Roadmap
37+
* [Roadmap](./Roadmap.md)
38+
39+
* Comparisons
40+
* [Differences from js_of_ocaml](./Differences-from-js_of_ocaml.md)

docs/Why-bucklescript-matters-for-Javascript-platform.md

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ libraries into small pieces like as done in [lodash](https://github.com/lodash/l
3737

3838
The OCaml compiler implementation(s) are famous for blazing fast compile times, and as programmer, we think compile times really matter and are a very important feature of a compiled language.
3939

40-
[images/compile-time.png](./images/compile-time.png)
41-
40+
![images/compile-time.png](./images/compile-time.png)
41+
4242
The above picture compares OCaml compilation-times with
4343
other languages: S for Scala, K for Koltin, TS for TypeScript.
44-
44+
4545
Bucklescript reuses most of the OCaml compiler (parsing/type
4646
checking and pattern match compilation), its type checker
4747
[was well engineered](http://okmij.org/ftp/ML/generalization.html)
@@ -131,7 +131,7 @@ We also compare code Size:
131131

132132
### How is it faster than hand-written JS code?
133133

134-
It's hard to explain JS performances in general, however, we will
134+
It's hard to explain JS performances in general, however, we will
135135
explain some of the optimizations we've done. For example, in OCaml, `Map`
136136
is like C++ templates, i.e. it will be instantiated by a comparison
137137
function, like below:
@@ -177,7 +177,3 @@ There are other factors count, mostly code organized in functional
177177
style are much easier to do the tree shaking while harder to remove
178178
for OO style, OCaml's standard library and runtime are organized in an
179179
independent style, which also helps dead code removal.
180-
181-
182-
183-

docs/_Sidebar.md

Lines changed: 0 additions & 40 deletions
This file was deleted.

docs/_template.html.tpl

Lines changed: 0 additions & 79 deletions
This file was deleted.

docs/dist/css/simple-sidebar.css

Lines changed: 0 additions & 125 deletions
This file was deleted.

docs/dist/js/.gitignore

Whitespace-only changes.

docs/dist/js/highlight.pack.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)