Skip to content

Commit c4a666d

Browse files
committed
chore: update readme
1 parent 9f667c3 commit c4a666d

File tree

2 files changed

+51
-16
lines changed

2 files changed

+51
-16
lines changed

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,31 @@
11
# Code Editor
22

33
CodeMirror 6 wrapper for Angular
4+
5+
## Installation
6+
7+
```bash
8+
npm install @acrodata/code-editor --save
9+
```
10+
11+
## Usage
12+
13+
```ts
14+
import { Component } from '@angular/core';
15+
import { FormsModule } from '@angular/forms';
16+
import { CodeEditor } from '@acrodata/code-editor';
17+
18+
@Component({
19+
selector: 'your-app',
20+
template: `<code-editor [(ngModel)]="value" />`,
21+
standalone: true,
22+
imports: [FormsModule, CodeEditor],
23+
})
24+
export class YourAppComponent {
25+
value = '';
26+
}
27+
```
28+
29+
## License
30+
31+
MIT

projects/code-editor/README.md

Lines changed: 23 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,31 @@
1-
# CodeEditor
1+
# Code Editor
22

3-
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 17.3.0.
3+
CodeMirror 6 wrapper for Angular
44

5-
## Code scaffolding
5+
## Installation
66

7-
Run `ng generate component component-name --project code-editor` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project code-editor`.
8-
> Note: Don't forget to add `--project code-editor` or else it will be added to the default project in your `angular.json` file.
7+
```bash
8+
npm install @acrodata/code-editor --save
9+
```
910

10-
## Build
11+
## Usage
1112

12-
Run `ng build code-editor` to build the project. The build artifacts will be stored in the `dist/` directory.
13+
```ts
14+
import { Component } from '@angular/core';
15+
import { FormsModule } from '@angular/forms';
16+
import { CodeEditor } from '@acrodata/code-editor';
1317

14-
## Publishing
18+
@Component({
19+
selector: 'your-app',
20+
template: `<code-editor [(ngModel)]="value" />`,
21+
standalone: true,
22+
imports: [FormsModule, CodeEditor],
23+
})
24+
export class YourAppComponent {
25+
value = '';
26+
}
27+
```
1528

16-
After building your library with `ng build code-editor`, go to the dist folder `cd dist/code-editor` and run `npm publish`.
29+
## License
1730

18-
## Running unit tests
19-
20-
Run `ng test code-editor` to execute the unit tests via [Karma](https://karma-runner.github.io).
21-
22-
## Further help
23-
24-
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page.
31+
MIT

0 commit comments

Comments
 (0)