Skip to content

Commit 0df4513

Browse files
committed
chore: update to 0.4.0
1 parent bbf5830 commit 0df4513

File tree

4 files changed

+41
-30
lines changed

4 files changed

+41
-30
lines changed

README.md

Lines changed: 36 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,46 @@ Angular 2+ component library for displaying diffs of text. [Demo](https://rars.g
77
## Quickstart
88

99
1. Install `ngx-diff` modules from npm:
10-
```
11-
npm install ngx-diff diff-match-patch-ts --save
12-
```
10+
```
11+
npm install ngx-diff diff-match-patch-ts --save
12+
```
1313
2. Import `NgxDiffModule` to your app:
14-
```
15-
import { BrowserModule } from '@angular/platform-browser';
16-
import { NgModule } from '@angular/core';
17-
import { NgxDiffModule } from 'ngx-diff';
18-
import { AppComponent } from './app.component';
19-
20-
@NgModule({
21-
declarations: [
22-
AppComponent
23-
],
24-
imports: [
25-
BrowserModule,
26-
NgxDiffModule
27-
],
28-
providers: [],
29-
bootstrap: [AppComponent]
30-
})
31-
export class AppModule { }
32-
```
14+
15+
```
16+
import { BrowserModule } from '@angular/platform-browser';
17+
import { NgModule } from '@angular/core';
18+
import { NgxDiffModule } from 'ngx-diff';
19+
import { AppComponent } from './app.component';
20+
21+
@NgModule({
22+
declarations: [
23+
AppComponent
24+
],
25+
imports: [
26+
BrowserModule,
27+
NgxDiffModule
28+
],
29+
providers: [],
30+
bootstrap: [AppComponent]
31+
})
32+
export class AppModule { }
33+
```
34+
3335
3. Use the `inline-diff` component by setting the `oldText` and `newText` attributes:
34-
```
35-
<inline-diff [oldText]="oldDocumentContents" [newText]="newDocumentContents" [lineContextSize]="4"></inline-diff>
36-
```
36+
```
37+
<inline-diff [oldText]="oldDocumentContents" [newText]="newDocumentContents" [lineContextSize]="4"></inline-diff>
38+
```
39+
40+
## Version history
41+
42+
| Angular Version | ngx-diff Version |
43+
| --------------- | ---------------- |
44+
| 9 | 0.2.0 |
45+
| 10 | 0.3.0 |
46+
| 11 | 0.4.0 |
3747

3848
## Contributions welcome!
49+
3950
If you have a feature or improvement you would like to see included, please raise an issue or a PR and I will review.
4051

4152
## License

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-diff",
3-
"version": "0.4.0-rc.0",
3+
"version": "0.4.0",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",

projects/ngx-diff/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
22
"name": "ngx-diff",
3-
"version": "0.4.0-rc.0",
3+
"version": "0.4.0",
44
"peerDependencies": {
5-
"@angular/common": ">=10.0.0",
6-
"@angular/core": ">=10.0.0",
5+
"@angular/common": ">=11.0.0",
6+
"@angular/core": ">=11.0.0",
77
"diff-match-patch-ts": ">=0.2.0"
88
},
99
"dependencies": {

0 commit comments

Comments
 (0)