@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.
Files changed (2) hide show
  1. package/README.md +49 -22
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # Mithril.js
2
2
 
3
- [![npm Version](https://img.shields.io/npm/v/mithril.svg)](https://www.npmjs.com/package/mithril)  
3
+ [![npm Version](https://img.shields.io/npm/v/@talyaron1/mithril.svg)](https://www.npmjs.com/package/@talyaron1/mithril)  
4
4
  [![License](https://img.shields.io/npm/l/mithril.svg)](https://github.com/MithrilJS/mithril.js/blob/main/LICENSE)  
5
- [![npm Downloads](https://img.shields.io/npm/dm/mithril.svg)](https://www.npmjs.com/package/mithril)  
6
- [![Build Status](https://img.shields.io/github/actions/workflow/status/MithrilJS/mithril.js/.github%2Fworkflows%2Ftest.yml?branch=main&event=push)](https://github.com/MithrilJS/mithril.js/actions)  
5
+ [![npm Downloads](https://img.shields.io/npm/dm/@talyaron1/mithril.svg)](https://www.npmjs.com/package/@talyaron1/mithril)  
6
+ [![Build Status](https://img.shields.io/github/actions/workflow/status/talyaron/mithril.js/.github%2Fworkflows%2Ftest.yml?branch=main)](https://github.com/talyaron/mithril.js/actions)  
7
7
  [![Donate at OpenCollective](https://img.shields.io/opencollective/all/mithriljs.svg?colorB=brightgreen)](https://opencollective.com/mithriljs)  
8
8
  [![Zulip, join chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](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 [Installing this fork](#installing-this-fork) below.
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
- ## Installing this fork
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
- From npm, under the name `mithril`:
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
- Installing it under that alias means `import m from "mithril"`, `mithril/stream` and `@types/mithril` work as usual, and other packages that depend on `mithril` get this fork too.
38
+ With yarn or pnpm:
35
39
 
36
- Or straight from GitHub, pinned to a release tag:
40
+ ```bash
41
+ yarn add mithril@npm:@talyaron1/mithril
42
+ ```
37
43
 
38
44
  ```bash
39
- npm install mithril@github:talyaron/mithril.js#v2.4.0-fork
45
+ pnpm add mithril@npm:@talyaron1/mithril
40
46
  ```
41
47
 
42
- ## Installation
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
- The instructions below are for the upstream package.
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
- ### npm
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 --save
90
+ npm install mithril@github:talyaron/mithril.js#v2.4.1-fork
62
91
  ```
63
92
 
64
- The ["Getting started" guide](https://mithril.js.org/#getting-started) is a good place to start learning how to use Mithril.js.
93
+ ### The upstream package
65
94
 
66
- TypeScript type definitions are available from DefinitelyTyped. They can be installed with:
95
+ The original package, without the fixes in this fork, is [`mithril`](https://www.npmjs.com/package/mithril): `npm install mithril`.
67
96
 
68
- ```bash
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@talyaron1/mithril",
3
- "version": "2.4.0",
3
+ "version": "2.4.1",
4
4
  "description": "A framework for building brilliant applications (Mithril.js v2 with unreleased bug fixes)",
5
5
  "author": "Leo Horie",
6
6
  "license": "MIT",