Skip to content

Commit b580e24

Browse files
committedJul 23, 2019
Prepare for v2, s/markup/html/g in code blocks
1 parent 20f0759 commit b580e24

File tree

6 files changed

+58
-57
lines changed

6 files changed

+58
-57
lines changed
 

‎.travis.yml

+41-40
Original file line numberDiff line numberDiff line change
@@ -28,46 +28,47 @@ script:
2828
- npm run perf
2929

3030
# After a successful build commit changes back to repo
31-
after_success:
32-
- |
33-
# Set up SSH environment
34-
$(npm bin)/set-up-ssh \
35-
--key "$encrypted_016049456622_key" \
36-
--iv "$encrypted_016049456622_iv" \
37-
--path-encrypted-key "./.deploy.enc"
38-
39-
# Commit bundle changes generated in before_script step
40-
# --commands is a weird no-op but required for commit-changes to run
41-
# --branch arg is to ensure this only runs against the `next` branch
42-
$(npm bin)/commit-changes \
43-
--commands "echo committing" \
44-
--commit-message "Bundled output for commit $TRAVIS_COMMIT [skip ci]" \
45-
--branch "next"
46-
47-
# Only want to commit docs when building pushes on master &
48-
# this doesn't have the built-in branch protection like commit-changes
49-
if [ "$TRAVIS_EVENT_TYPE" == "push" ] && \
50-
[ "$TRAVIS_BRANCH" == "master" ] && \
51-
[ "$TRAVIS_REPO_SLUG" == "MithrilJS/mithril.js" ]
52-
then
53-
# Generate docs
54-
npm run gendocs
55-
56-
# Set up git env
57-
git config --global user.email "$GH_USER_EMAIL"
58-
git config --global user.name "$GH_USER_NAME"
59-
60-
# Commit docs to gh-pages branch
61-
# Using --add to ensure that archived versions aren't lost
62-
# Using --repo to force it to go over SSH so the saved keys are used (tschaub/gh-pages#160)
63-
$(npm bin)/gh-pages \
64-
--dist ./dist \
65-
--add \
66-
--repo "git@github.com:MithrilJS/mithril.js.git" \
67-
--message "Generated docs for commit $TRAVIS_COMMIT [skip ci]"
68-
else
69-
echo "Not submitting documentation updates"
70-
fi
31+
# Disable per https://github.com/MithrilJS/mithril.js/issues/2417
32+
# after_success:
33+
# - |
34+
# # Set up SSH environment
35+
# $(npm bin)/set-up-ssh \
36+
# --key "$encrypted_016049456622_key" \
37+
# --iv "$encrypted_016049456622_iv" \
38+
# --path-encrypted-key "./.deploy.enc"
39+
#
40+
# # Commit bundle changes generated in before_script step
41+
# # --commands is a weird no-op but required for commit-changes to run
42+
# # --branch arg is to ensure this only runs against the `next` branch
43+
# $(npm bin)/commit-changes \
44+
# --commands "echo committing" \
45+
# --commit-message "Bundled output for commit $TRAVIS_COMMIT [skip ci]" \
46+
# --branch "next"
47+
#
48+
# # Only want to commit docs when building pushes on master &
49+
# # this doesn't have the built-in branch protection like commit-changes
50+
# if [ "$TRAVIS_EVENT_TYPE" == "push" ] && \
51+
# [ "$TRAVIS_BRANCH" == "master" ] && \
52+
# [ "$TRAVIS_REPO_SLUG" == "MithrilJS/mithril.js" ]
53+
# then
54+
# # Generate docs
55+
# npm run gendocs
56+
#
57+
# # Set up git env
58+
# git config --global user.email "$GH_USER_EMAIL"
59+
# git config --global user.name "$GH_USER_NAME"
60+
#
61+
# # Commit docs to gh-pages branch
62+
# # Using --add to ensure that archived versions aren't lost
63+
# # Using --repo to force it to go over SSH so the saved keys are used (tschaub/gh-pages#160)
64+
# $(npm bin)/gh-pages \
65+
# --dist ./dist \
66+
# --add \
67+
# --repo "git@github.com:MithrilJS/mithril.js.git" \
68+
# --message "Generated docs for commit $TRAVIS_COMMIT [skip ci]"
69+
# else
70+
# echo "Not submitting documentation updates"
71+
# fi
7172

7273
# Environment configuration
7374
env:

‎docs/index.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ An easy way to try out Mithril is to include it from a CDN and follow this tutor
5656

5757
Let's create an HTML file to follow along:
5858

59-
```markup
59+
```html
6060
<body>
61-
<script src="https://unpkg.com/mithril@next/mithril.js"></script>
61+
<script src="https://unpkg.com/mithril/mithril.js"></script>
6262
<script>
6363
var root = document.body
6464
@@ -173,7 +173,7 @@ m.mount(root, Hello)
173173

174174
As you would expect, doing so creates this markup:
175175

176-
```markup
176+
```html
177177
<main>
178178
<h1 class="title">My first app</h1>
179179
<button>A button</button>

‎docs/installation.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@
99

1010
If you're new to JavaScript or just want a very simple setup to get your feet wet, you can get Mithril from a [CDN](https://en.wikipedia.org/wiki/Content_delivery_network):
1111

12-
```markup
13-
<script src="https://unpkg.com/mithril@next/mithril.js"></script>
12+
```html
13+
<script src="https://unpkg.com/mithril/mithril.js"></script>
1414
```
1515

1616
---
1717

1818
### NPM
1919

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

2424
TypeScript type definitions are available from DefinitelyTyped. They can be installed with:
@@ -46,7 +46,7 @@ $ npm init --yes
4646

4747
2. install required tools
4848
```bash
49-
$ npm install mithril@next --save
49+
$ npm install mithril --save
5050
$ npm install webpack webpack-cli --save-dev
5151
```
5252

@@ -97,7 +97,7 @@ npm init --yes
9797
Then, to install Mithril, run:
9898

9999
```bash
100-
npm install mithril@next --save
100+
npm install mithril --save
101101
```
102102

103103
This will create a folder called `node_modules`, and a `mithril` folder inside of it. It will also add an entry under `dependencies` in the `package.json` file
@@ -148,7 +148,7 @@ npm start
148148

149149
Now that you have created a bundle, you can then reference the `bin/app.js` file from an HTML file:
150150

151-
```markup
151+
```html
152152
<html>
153153
<head>
154154
<title>Hello world</title>
@@ -220,7 +220,7 @@ Live reload is a feature where code changes automatically trigger the page to re
220220

221221
```bash
222222
# 1) install
223-
npm install mithril@next --save
223+
npm install mithril --save
224224
npm install budo -g
225225

226226
# 2) add this line into the scripts section in package.json
@@ -255,13 +255,13 @@ If you want to try it and give feedback, you can open `package.json` and change
255255

256256
If you don't have the ability to run a bundler script due to company security policies, there's an options to not use a module system at all:
257257

258-
```markup
258+
```html
259259
<html>
260260
<head>
261261
<title>Hello world</title>
262262
</head>
263263
<body>
264-
<script src="https://unpkg.com/mithril@next/mithril.js"></script>
264+
<script src="https://unpkg.com/mithril/mithril.js"></script>
265265
<script src="index.js"></script>
266266
</body>
267267
</html>

‎docs/simple-application.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Let's develop a simple application that shows off how to do most of the major th
66

77
First let's create an entry point for the application. Create a file `index.html`:
88

9-
```markup
9+
```html
1010
<!doctype html>
1111
<html>
1212
<head>
@@ -217,7 +217,7 @@ The `m.mount` call renders the specified component (`UserList`) into a DOM eleme
217217

218218
Right now, the list looks rather plain because we have not defined any styles. So let's add a few of them. Let's first create a file called `styles.css` and include it in the `index.html` file:
219219

220-
```markup
220+
```html
221221
<!doctype html>
222222
<html>
223223
<head>

‎docs/stream.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ var Stream = require("mithril/stream")
4545

4646
You can also download the module directly if your environment does not support a bundling toolchain:
4747

48-
```markup
49-
<script src="https://unpkg.com/mithril@next/stream/stream.js"></script>
48+
```html
49+
<script src="https://unpkg.com/mithril/stream/stream.js"></script>
5050
```
5151

5252
When loaded directly with a `<script>` tag (rather than required), the stream library will be exposed as `window.m.stream`. If `window.m` is already defined (e.g. because you also use the main Mithril script), it will attach itself to the existing object. Otherwise it creates a new `window.m`. If you want to use streams in conjunction with Mithril as raw script tags, you should include Mithril in your page before `mithril/stream`, because `mithril` will otherwise overwrite the `window.m` object defined by `mithril/stream`. This is not a concern when the libraries are consumed as CommonJS modules (using `require(...)`).

‎docs/trust.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ One common way to misuse `m.trust` is when working with third party services who
121121

122122
Here's the example snippet for the [Facebook Like button](https://developers.facebook.com/docs/plugins/like-button):
123123

124-
```markup
124+
```html
125125
<!-- Load Facebook SDK for JavaScript -->
126126
<div id="fb-root"></div>
127127
<script>(function(d, s, id) {

0 commit comments

Comments
 (0)
Please sign in to comment.