@talyaron1/mithril 2.4.0 → 2.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -22
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# Mithril.js
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/mithril)
|
|
3
|
+
[](https://www.npmjs.com/package/@talyaron1/mithril)
|
|
4
4
|
[](https://github.com/MithrilJS/mithril.js/blob/main/LICENSE)
|
|
5
|
-
[](https://www.npmjs.com/package/mithril)
|
|
6
|
-
[](https://www.npmjs.com/package/@talyaron1/mithril)
|
|
6
|
+
[](https://github.com/talyaron/mithril.js/actions)
|
|
7
7
|
[](https://opencollective.com/mithriljs)
|
|
8
8
|
[](https://mithril.zulipchat.com/)
|
|
9
9
|
|
|
10
|
-
> **This is a fork.** [talyaron/mithril.js](https://github.com/talyaron/mithril.js) is Mithril.js v2 with bug fixes that are not in an upstream release. The API is unchanged. See the [list of changes](docs/recent-changes.md), and [
|
|
10
|
+
> **This is a fork.** [talyaron/mithril.js](https://github.com/talyaron/mithril.js) is Mithril.js v2 with bug fixes that are not in an upstream release. The API is unchanged. See the [list of changes](docs/recent-changes.md), and [Installation](#installation) below.
|
|
11
11
|
|
|
12
12
|
- [What is Mithril.js?](#what-is-mithriljs)
|
|
13
13
|
- [Installation](#installation)
|
|
@@ -23,51 +23,78 @@ Mithril.js is used by companies like Vimeo and Nike, and open source platforms l
|
|
|
23
23
|
|
|
24
24
|
Mithril.js supports Firefox ESR, and the last two versions of Firefox, Edge, Safari, and Chrome. No polyfills required. 👌
|
|
25
25
|
|
|
26
|
-
##
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
This fork is published on npm as [`@talyaron1/mithril`](https://www.npmjs.com/package/@talyaron1/mithril).
|
|
29
|
+
|
|
30
|
+
### npm
|
|
27
31
|
|
|
28
|
-
|
|
32
|
+
Install it under the name `mithril`:
|
|
29
33
|
|
|
30
34
|
```bash
|
|
31
35
|
npm install mithril@npm:@talyaron1/mithril
|
|
32
36
|
```
|
|
33
37
|
|
|
34
|
-
|
|
38
|
+
With yarn or pnpm:
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
```bash
|
|
41
|
+
yarn add mithril@npm:@talyaron1/mithril
|
|
42
|
+
```
|
|
37
43
|
|
|
38
44
|
```bash
|
|
39
|
-
|
|
45
|
+
pnpm add mithril@npm:@talyaron1/mithril
|
|
40
46
|
```
|
|
41
47
|
|
|
42
|
-
|
|
48
|
+
That adds this line to your `package.json`:
|
|
49
|
+
|
|
50
|
+
```json
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"mithril": "npm:@talyaron1/mithril@^2.4.0"
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
Because the package is installed under the name `mithril`, your code does not change, and other packages that depend on `mithril` use this fork too:
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
import m from "mithril"
|
|
60
|
+
import Stream from "mithril/stream"
|
|
61
|
+
```
|
|
43
62
|
|
|
44
|
-
|
|
63
|
+
If your app already uses the upstream `mithril` package, run the same install command: it replaces the upstream package with this fork.
|
|
64
|
+
|
|
65
|
+
### TypeScript
|
|
66
|
+
|
|
67
|
+
The type definitions from DefinitelyTyped work with this fork, as long as it is installed under the name `mithril`:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
npm install @types/mithril --save-dev
|
|
71
|
+
```
|
|
45
72
|
|
|
46
73
|
### CDN
|
|
47
74
|
|
|
48
75
|
```html
|
|
49
76
|
<!-- Development: whichever you prefer -->
|
|
50
|
-
<script src="https://unpkg.com/mithril/mithril.js"></script>
|
|
51
|
-
<script src="https://cdn.jsdelivr.net/npm/mithril/mithril.js"></script>
|
|
77
|
+
<script src="https://unpkg.com/@talyaron1/mithril/mithril.js"></script>
|
|
78
|
+
<script src="https://cdn.jsdelivr.net/npm/@talyaron1/mithril/mithril.js"></script>
|
|
52
79
|
|
|
53
80
|
<!-- Production: whichever you prefer -->
|
|
54
|
-
<script src="https://unpkg.com/mithril/mithril.min.js"></script>
|
|
55
|
-
<script src="https://cdn.jsdelivr.net/npm/mithril/mithril.min.js"></script>
|
|
81
|
+
<script src="https://unpkg.com/@talyaron1/mithril/mithril.min.js"></script>
|
|
82
|
+
<script src="https://cdn.jsdelivr.net/npm/@talyaron1/mithril/mithril.min.js"></script>
|
|
56
83
|
```
|
|
57
84
|
|
|
58
|
-
###
|
|
85
|
+
### From GitHub
|
|
86
|
+
|
|
87
|
+
To install straight from this repository, pinned to a release tag:
|
|
59
88
|
|
|
60
89
|
```bash
|
|
61
|
-
npm install mithril
|
|
90
|
+
npm install mithril@github:talyaron/mithril.js#v2.4.1-fork
|
|
62
91
|
```
|
|
63
92
|
|
|
64
|
-
The
|
|
93
|
+
### The upstream package
|
|
65
94
|
|
|
66
|
-
|
|
95
|
+
The original package, without the fixes in this fork, is [`mithril`](https://www.npmjs.com/package/mithril): `npm install mithril`.
|
|
67
96
|
|
|
68
|
-
|
|
69
|
-
$ npm install @types/mithril --save-dev
|
|
70
|
-
```
|
|
97
|
+
The ["Getting started" guide](https://mithril.js.org/#getting-started) is a good place to start learning how to use Mithril.js.
|
|
71
98
|
|
|
72
99
|
## Documentation
|
|
73
100
|
|