Skip to content

Commit 234b1c9

Browse files
committedJul 24, 2019
Update migration, fix various minor issues
- Lot of people couldn't migrate to v1 and plan to reevaluate when v2 is released. - It's "npm" not "NPM". It doesn't stand for anything, and it never has - it was initially chosen simply because it was easy to type. It has a lot of unofficial backronyms with "Node Package Manager" being one of the most common ones, but it's never officially stood for anything as an acronym *or* initialism. - Fixed a few errors in the change log, like non-breaking changes being included in the "Breaking Changes" section and an inaccuracy in the summary of a particular change. - Fixed RawGit URLs to point to GitHack, which is a lighter proxy that offloads caching to Cloudflare instead of also implementing it itself. (It also just uses nginx for all the important server logic, so it scales better.) - Add a few more v0.2 references as appropriate
1 parent 8186818 commit 234b1c9

26 files changed

+1389
-935
lines changed
 

‎README.md

+10-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
mithril.js [![NPM Version](https://img.shields.io/npm/v/mithril.svg)](https://www.npmjs.com/package/mithril) [![NPM License](https://img.shields.io/npm/l/mithril.svg)](https://www.npmjs.com/package/mithril) [![NPM Downloads](https://img.shields.io/npm/dm/mithril.svg)](https://www.npmjs.com/package/mithril) [![Donate at OpenCollective](https://img.shields.io/opencollective/all/mithriljs.svg?colorB=brightgreen)](https://opencollective.com/mithriljs)
1+
mithril.js [![npm Version](https://img.shields.io/npm/v/mithril.svg)](https://www.npmjs.com/package/mithril) [![npm License](https://img.shields.io/npm/l/mithril.svg)](https://www.npmjs.com/package/mithril) [![npm Downloads](https://img.shields.io/npm/dm/mithril.svg)](https://www.npmjs.com/package/mithril) [![Donate at OpenCollective](https://img.shields.io/opencollective/all/mithriljs.svg?colorB=brightgreen)](https://opencollective.com/mithriljs)
22
==========
33

44
<p align="center">
@@ -29,17 +29,19 @@ Mithril supports IE11, Firefox ESR, and the last two versions of Firefox, Edge,
2929
### CDN
3030

3131
```html
32-
<script src="https://unpkg.com/mithril@next/mithril.js"></script>
33-
<!-- or -->
34-
<script src="https://cdn.jsdelivr.net/npm/mithril@next/mithril.js"></script>
32+
<!-- Development: whichever you prefer -->
33+
<script src="https://unpkg.com/mithril/mithril.js"></script>
34+
<script src="https://cdn.jsdelivr.net/npm/mithril/mithril.js"></script>
35+
36+
<!-- Production: whichever you prefer -->
37+
<script src="https://unpkg.com/mithril/mithril.min.js"></script>
38+
<script src="https://cdn.jsdelivr.net/npm/mithril/mithril.min.js"></script>
3539
```
3640

3741
### npm
42+
3843
```bash
39-
# For the most recent stable version
40-
$ npm install mithril --save
41-
# For the most recent unstable version
42-
$ npm install mithril@next --save
44+
npm install mithril --save
4345
```
4446

4547
The ["Getting started" guide](https://mithril.js.org/#getting-started) is a good place to start learning how to use mithril.

‎docs/animation.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
### Technology choices
1111

12-
Animations are often used to make applications come alive. Nowadays, browsers have good support for CSS animations, and there are [various](https://greensock.com/gsap) [libraries](http://velocityjs.org/) that provide fast JavaScript-based animations. There's also an upcoming [Web API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Using_the_Web_Animations_API) and a [polyfill](https://github.com/web-animations/web-animations-js) if you like living on the bleeding edge.
12+
Animations are often used to make applications come alive. Nowadays, browsers have good support for CSS animations, and there are [various](https://greensock.com/gsap) [libraries](https://velocityjs.org/) that provide fast JavaScript-based animations. There's also an upcoming [Web API](https://developer.mozilla.org/en-US/docs/Web/API/Web_Animations_API/Using_the_Web_Animations_API) and a [polyfill](https://github.com/web-animations/web-animations-js) if you like living on the bleeding edge.
1313

1414
Mithril does not provide any animation APIs per se, since these other options are more than sufficient to achieve rich, complex animations. Mithril does, however, offer hooks to make life easier in some specific cases where it's traditionally difficult to make animations work.
1515

@@ -102,4 +102,4 @@ Note that the `onbeforeremove` hook only fires on the element that loses its `pa
102102

103103
When creating animations, it's recommended that you only use the `opacity` and `transform` CSS rules, since these can be hardware-accelerated by modern browsers and yield better performance than animating `top`, `left`, `width`, and `height`.
104104

105-
It's also recommended that you avoid the `box-shadow` rule and selectors like `:nth-child`, since these are also resource intensive options. If you want to animate a `box-shadow`, consider [putting the `box-shadow` rule on a pseudo element, and animate that element's opacity instead](http://tobiasahlin.com/blog/how-to-animate-box-shadow/). Other things that can be expensive include large or dynamically scaled images and overlapping elements with different `position` values (e.g. an absolute positioned element over a fixed element).
105+
It's also recommended that you avoid the `box-shadow` rule and selectors like `:nth-child`, since these are also resource intensive options. If you want to animate a `box-shadow`, consider [putting the `box-shadow` rule on a pseudo element, and animate that element's opacity instead](https://tobiasahlin.com/blog/how-to-animate-box-shadow/). Other things that can be expensive include large or dynamically scaled images and overlapping elements with different `position` values (e.g. an absolute positioned element over a fixed element).

‎docs/api.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ var Home = {
4141
}
4242

4343
m.route(document.body, "/home", {
44-
"/home": Home, // defines `http://localhost/#!/home`
44+
"/home": Home, // defines `https://example.com/#!/home`
4545
})
4646
```
4747

0 commit comments

Comments
 (0)
Please sign in to comment.