File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed
Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 11# How to use it in an angular project
22Add the these dependencies to your `` package.json `` :
33- [ atularen/ngx-monaco-editor] ( https://github.com/atularen/ngx-monaco-editor )
4- - [ celian-garcia /monaco-languages- promql] ( https://github.com/celian-garcia /monaco-languages -promql )
4+ - [ prometheus-community /monaco-promql] ( https://github.com/prometheus-community /monaco-promql )
55
66``` bash
77npm install ngx-monaco-editor --save
8- npm install monaco-languages- promql --save
8+ npm install monaco-promql --save
99```
1010
1111Add the glob to assets in your `` angular.json `` configuration file.
@@ -36,7 +36,7 @@ import { FormsModule } from '@angular/forms';
3636import { BrowserModule } from ' @angular/platform-browser' ;
3737import { MonacoEditorModule } from ' ngx-monaco-editor' ;
3838
39- import { promLanguageDefinition } from ' monaco-languages- promql/lib /promql/promql.contribution' ;
39+ import { promLanguageDefinition } from ' monaco-promql/promql/promql.contribution' ;
4040import { NgxMonacoEditorConfig } from ' ngx-monaco-editor' ;
4141import { AppComponent } from ' ./app.component' ;
4242
Original file line number Diff line number Diff line change 11# How to use it in an react project
22
33> #### Create a react project
4- > I'm not used to play with react so I found an easy to use spawner.
4+ > I'm not used to play with react so I found an easy to use spawner.
55> If you are like me, you can use the [ facebook/create-react-app] ( https://github.com/facebook/create-react-app )
66> ``` bash
77> npx create-react-app my-app
1212Add these dependencies to your ` ` package.json` ` :
1313- [microsoft/monaco-editor](https://github.com/microsoft/monaco-editor)
1414- [react-monaco-editor/react-monaco-editor](https://github.com/react-monaco-editor/react-monaco-editor)
15- - [celian-garcia /monaco-languages- promql](https://github.com/celian-garcia /monaco-languages -promql)
15+ - [prometheus-community /monaco-promql](https://github.com/prometheus-community /monaco-promql)
1616
1717` ` ` bash
1818npm install monaco-editor --save
1919npm install react-monaco-editor --save
20- npm install monaco-languages- promql --save
20+ npm install monaco-promql --save
2121```
2222
2323Here is an example of simple component.
2424
2525``` javascript
2626import MonacoEditor from ' react-monaco-editor' ;
27- import {promLanguageDefinition } from ' monaco-languages- promql/lib /promql/promql.contribution' ;
27+ import {promLanguageDefinition } from ' monaco-promql/promql/promql.contribution' ;
2828
2929function App () {
3030 function editorWillMount (monaco ) {
You can’t perform that action at this time.
0 commit comments