Skip to content

Commit c335aa7

Browse files
authored
docs: latest site updates (#2126)
1 parent 6fb77b7 commit c335aa7

File tree

6 files changed

+27
-27
lines changed

6 files changed

+27
-27
lines changed

docs/installation.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ If you're new to Javascript or just want a very simple setup to get your feet we
1818
### NPM
1919

2020
```bash
21-
$> npm install mithril --save
21+
$ npm install mithril --save
2222
```
2323

2424
---
@@ -27,46 +27,45 @@ $> npm install mithril --save
2727

2828
1. Initialize the directory as an npm package
2929
```bash
30-
$> npm init --yes
30+
$ npm init --yes
3131
```
3232

3333
2. install required tools
3434
```bash
35-
$> npm install mithril --save
36-
$> npm install webpack webpack-cli --save-dev
35+
$ npm install mithril --save
36+
$ npm install webpack webpack-cli --save-dev
3737
```
3838

3939
3. Add a "start" entry to the scripts section in `package.json`.
4040
```js
4141
{
42-
// ...
43-
"scripts": {
44-
"start": "webpack src/index.js --output bin/app.js -d --watch"
45-
}
42+
// ...
43+
"scripts": {
44+
"start": "webpack src/index.js --output bin/app.js -d --watch"
45+
}
4646
}
4747
```
4848

49-
3. Create `src/index.js`
49+
4. Create `src/index.js` file.
5050
```js
5151
import m from "mithril";
52-
5352
m.render(document.body, "hello world");
5453
```
5554

56-
4. create `index.html`
55+
5. create `index.html`
5756
```html
5857
<!DOCTYPE html>
5958
<body>
6059
<script src="bin/app.js"></script>
6160
</body>
6261
```
6362

64-
5. run bundler
63+
6. run bundler
6564
```bash
66-
$> npm start
65+
$ npm start
6766
```
6867

69-
6. open `index.html` in a browser
68+
7. open `index.html` in a browser
7069

7170
#### Step by step
7271

@@ -268,7 +267,7 @@ m.render(document.body, "hello world")
268267
TypeScript type definitions are available from DefinitelyTyped. They can be installed with:
269268

270269
```bash
271-
$> npm install @types/mithril --save-dev
270+
$ npm install @types/mithril --save-dev
272271
```
273272

274273
For example usage, to file issues or to discuss TypeScript related topics visit: https://github.com/MithrilJS/mithril.d.ts

docs/integrating-libs.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# Integrating with Other Libraries
1+
# 3rd Party Integration
2+
23
Integration with third party libraries or vanilla javascript code can be achieved via [lifecycle methods](lifecycle-methods.md).
34

4-
- [Usage](#usage)
5+
## Example
56

6-
### Usage
77
```javascript
88
var FullCalendar = {
99

@@ -19,7 +19,7 @@ var FullCalendar = {
1919
// Consider that the lib will modify this parent element in the DOM (e.g. add dependent class attribute and values).
2020
// As long as you return the same view results here, mithril will not
2121
// overwrite the actual DOM because it's always comparing old and new VDOM
22-
// before applying DOM updates.
22+
// before applying DOM updates.
2323
view: function (vnode) {
2424
return m('div')
2525
},
@@ -54,4 +54,4 @@ m.mount(document.body, {
5454

5555
```
5656

57-
Running example [flems: FullCalendar](https://flems.io/#0=N4IgZglgNgpgziAXAbVAOwIYFsZJAOgAsAXLKEAGhAGMB7NYmBvAHigjQGsACAJxigBeADog4xAJ6w4hGDGKjuhfmBEgSxAA5xEAel3UAJmgBWcfNSi0ArobBQM-C7Sy6MJjAA9d7AEZxdMGsoKGoMWDRDR10AZnwAdnwABkDg0PCmKN58LA4LODhRAD4QAF8KdGxcRAIzShp6RmYagDdHbgAxNIBhDMj2wW5gYTQR4WJ6an4MRkRuILRqYgh6bgAKFrRaQxgASiGxhWI6NDhaWHwrAHM1gHIukN6oft5EREnpxlvdw-GAEg2Wx2+EMLl2+CCjz6WTWw1GR3G+m4mmsxG4EhsvG4HAgy3C3FommW9Dg3AwkW4YRCvgw1E4pNk-F+xFKP1G8PGAHlfCYYEt8BgChArmhAdsYALiMReOZNI4mMQAMrEGYwChDSFQJ6ZRwAUSgc024pBLlZh3KY3hLQgMAA7nMFksVmh1kadvs4eNxvxiNZeC6sHdDBAWt9zRRLeN6L4YGBaPx+FhaC0YA7rItiS6xe6DhziEiAErpsloCTcHbiXi0Mu6SmwcnWTTcHDEQjbBkwJzM-QAt0S8SqiE9aF6qDgzXal5B+DS6th+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AUSgc024pBLlZh3KY3hLQgMAA7nMFksVmh1kadvs4eNxvxiNZeC6sHdDBAWt9zRRLeN6L4YGBaPx+FhaC0YA7rItiS6xe6DhziEiAErpsloCTcHbiXi0Mu6SmwcnWTTcHDEQjbBkwJzM-QAt0S8SqiE9aF6qDgzXal5B+DS6th+GlEaL9lYHI2BhrUHUaw4Bj4XzbCTqz3Ea12tMZ52uoF7XNe6XyP0u5DM8aB26EACMt3Vt0nWW+CM8zfNYHi1EdeGPOV+AYZVVUNG98AHRhWSA+8QNuXxUQmNAfzvBEjkmdg6TmTR+BaV8WV-ABZXFlGgbgACFsNWABaQDKPfLCpXoPCT3QnDLAgEjuDQGBPAUYCqO4W5aNbXgGOYniXQAannZkAF1IyOR1M1E8TiDWD1KN7RDkIlCcIP1cdhwiGFbjEiT1KOZdmV0q8yJgFojPw+9TONcyhyhOzRxs4KdV4O5PNDNl71chdLVZMoKhATAcDwfIECoE4mmIPAyg0qh2C4BAUEqdKalyeToHqP1yBqDRtD0XR000TgrmcVwqvoqAAAFP3wAaAFZdG6hSoHwOoqEkTRqhAOpynKuak13PKqDqvBGp0fRWvazrRpcBVeoAJkGgBOfBjoO1bJqykAZrmhaUrSx6AEdrE7CRat4er1ClJqdrQNqOroVwTHez7eriU7P10YNxF0cGPt4CRbvqB68Cepa8E1KkIu+36tua3aQZcVIQjxl4oYSZI4YgBHcYgtHpokWbMYQUoNNKIA)

docs/learning-mithril.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Learning Mithril
1+
# Learning Resources
22

33
Links to Mithril learning content:
44

docs/nav-guides.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
1-
- Tutorials
2-
- [Installation](installation.md)
1+
- Getting Started
32
- [Introduction](index.md)
3+
- [Installation](installation.md)
44
- [Tutorial](simple-application.md)
5+
- [Learning Resources](learning-mithril.md)
6+
- [Getting Help](support.md)
57
- Resources
68
- [JSX](jsx.md)
79
- [ES6](es6.md)
810
- [CSS](css.md)
911
- [Animation](animation.md)
1012
- [Testing](testing.md)
1113
- [Examples](examples.md)
12-
- [Integrating with Other Libraries](integrating-libs.md)
13-
- [Learning Mithril](learning-mithril.md)
14+
- [3rd Party Integration](integrating-libs.md)
1415
- Key concepts
1516
- [Vnodes](vnodes.md)
1617
- [Components](components.md)

docs/route.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ m.route(document.body, "/", {
475475
})
476476
```
477477

478-
Note that in this case, if the Layout component the `oninit` and `oncreate` lifecycle methods would only fire on the Layout component on the first route change (assuming all routes use the same layout).
478+
Note that in this case, if the Layout component has `oninit` and `oncreate` lifecycle methods, they would only fire on the first route change (assuming all routes use the same layout).
479479

480480
To clarify the difference between the two examples, example 1 is equivalent to this code:
481481

docs/support.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
## Getting Help
1+
# Getting Help
22

33
Mithril has an active & welcoming community on [Gitter](https://gitter.im/mithriljs/mithril.js), or feel free to ask questions on [Stack Overflow](https://stackoverflow.com/questions/tagged/mithril.js) using the `mithril.js` tag.

0 commit comments

Comments
 (0)