Skip to content

Commit ee68995

Browse files
author
Alex Brufsky
committed
3.1.3 release
1 parent f9d7713 commit ee68995

File tree

2 files changed

+11
-14
lines changed

2 files changed

+11
-14
lines changed

README.md

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,32 @@
33
</p>
44
<br/>
55

6-
[![Build Status](https://travis-ci.com/praneshr/react-diff-viewer.svg?branch=master)](https://travis-ci.com/praneshr/react-diff-viewer)
7-
[![npm version](https://badge.fury.io/js/react-diff-viewer.svg)](https://badge.fury.io/js/react-diff-viewer)
8-
[![GitHub license](https://img.shields.io/github/license/praneshr/react-diff-viewer.svg)](https://github.com/praneshr/react-diff-viewer/blob/master/LICENSE)
6+
[![npm version](https://badge.fury.io/js/@alexbruf%2Freact-diff-viewer.svg)](https://badge.fury.io/js/@alexbruf%2Freact-diff-viewer)
7+
[![GitHub license](https://img.shields.io/github/license/praneshr/react-diff-viewer.svg)](https://github.com/alexbruf/react-diff-viewer/blob/master/LICENSE)
98

109
A simple and beautiful text diff viewer component made with [Diff](https://github.com/kpdecker/jsdiff) and [React](https://reactjs.org).
1110

1211
Inspired from Github diff viewer, it includes features like split view, inline view, word diff, line highlight and more. It is highly customizable and it supports almost all languages.
1312

1413
**React 18/19 Compatible**
1514

16-
This version of `react-diff-viewer` is compatible with React v18 and v19, utilizing functional components and hooks internally.
17-
18-
Check [here](https://github.com/praneshr/react-diff-viewer/tree/v2.0) for v2.0
15+
This version of `@alexbruf/react-diff-viewer` is compatible with React v18 and v19, utilizing functional components and hooks internally.
1916

2017
## Install
2118

2219
```bash
23-
yarn add react-diff-viewer
20+
yarn add @alexbruf/react-diff-viewer
2421

2522
# or
2623

27-
npm i react-diff-viewer
24+
npm i @alexbruf/react-diff-viewer
2825
```
2926

3027
## Usage
3128

3229
```javascript
3330
import React from 'react';
34-
import ReactDiffViewer from 'react-diff-viewer';
31+
import ReactDiffViewer from '@alexbruf/react-diff-viewer';
3532

3633
const oldCode = `
3734
const a = 10
@@ -70,7 +67,7 @@ export default App;
7067
| newValue | `string` | `''` | New value as string. |
7168
| splitView | `boolean` | `true` | Switch between `unified` and `split` view. |
7269
| disableWordDiff | `boolean` | `false` | Show and hide word diff in a diff line. |
73-
| compareMethod | `DiffMethod` | `DiffMethod.CHARS` | JsDiff text diff method used for diffing strings. Check out the [guide](https://github.com/praneshr/react-diff-viewer/tree/v3.0.0#text-block-diff-comparison) to use different methods. |
70+
| compareMethod | `DiffMethod` | `DiffMethod.CHARS` | JsDiff text diff method used for diffing strings. Check out the [guide](https://github.com/alexbruf/react-diff-viewer/tree/master#text-block-diff-comparison) to use different methods. |
7471
| hideLineNumbers | `boolean` | `false` | Show and hide line numbers. |
7572
| renderContent | `function` | `undefined` | Render Prop API to render code in the diff viewer. Helpful for [syntax highlighting](#syntax-highlighting) |
7673
| onLineNumberClick | `function` | `undefined` | Event handler for line number click. `(lineId: string) => void` |
@@ -106,7 +103,7 @@ An example using [Prism JS](https://prismjs.com)
106103

107104
```javascript
108105
import React, { useCallback } from 'react';
109-
import ReactDiffViewer from 'react-diff-viewer';
106+
import ReactDiffViewer from '@alexbruf/react-diff-viewer';
110107

111108
const oldCode = `
112109
const a = 10
@@ -174,7 +171,7 @@ enum DiffMethod {
174171

175172
```javascript
176173
import React from 'react';
177-
import ReactDiffViewer, { DiffMethod } from 'react-diff-viewer';
174+
import ReactDiffViewer, { DiffMethod } from '@alexbruf/react-diff-viewer';
178175

179176
const oldCode = `
180177
{
@@ -298,7 +295,7 @@ For keys other than `variables`, the value can either be an object or string int
298295

299296
```javascript
300297
import React, { useCallback } from 'react';
301-
import ReactDiffViewer from 'react-diff-viewer';
298+
import ReactDiffViewer from '@alexbruf/react-diff-viewer';
302299

303300
const oldCode = `
304301
const a = 10

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@alexbruf/react-diff-viewer",
3-
"version": "3.1.2",
3+
"version": "3.1.3",
44
"private": false,
55
"description": "A simple and beautiful text diff viewer component made with diff and React",
66
"keywords": [

0 commit comments

Comments
 (0)