You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-6Lines changed: 13 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,10 +15,12 @@ For more detail please visit:
15
15
16
16
## Usage
17
17
18
-
To install this library as a dependency in another project:
19
-
`npm install --save node-diff3`
18
+
To install node-diff3 as a dependency in another project:
19
+
```bash
20
+
$ npm install --save node-diff3
21
+
```
20
22
21
-
This library is distributed in both UMD and ES6 module formats. ([read more](https://dev.to/iggredible/what-the-heck-are-cjs-amd-umd-and-esm-ikm))
23
+
This library is distributed in both UMD and ES6 module formats for maxmimum compatibility. <sub>([read more about Javascript module formats](https://dev.to/iggredible/what-the-heck-are-cjs-amd-umd-and-esm-ikm))</sub>
22
24
*`index.mjs` - ES6 module
23
25
*`dist/index.js` - UMD module, ES6 syntax
24
26
*`dist/index.es5.js` - UMD module, ES5 syntax
@@ -33,14 +35,19 @@ import * as Diff3 from 'node-diff3'; // ES6 import all
33
35
import { diff3Merge } from'node-diff3'; // ES6 import named
34
36
```
35
37
36
-
You can also use UMD builds of node-diff3 directly in a web browser. A good way to do this is to fetch the file from the [jsDelivr CDN](https://www.jsdelivr.com/):
38
+
You can also use node-diff3 directly in a web browser. A good way to do this is to fetch the file from the [jsDelivr CDN](https://www.jsdelivr.com/), which can even deliver minified versions:
39
+
40
+
The latest versions of many web browsers now support [ES6 modules in script tags](https://caniuse.com/#feat=es6-module) like this:
0 commit comments