Skip to content

Commit 94c1fe1

Browse files
authored
Merge pull request #216 from atularen/12.x.x
12.x.x
2 parents 5f3fc50 + 74bed56 commit 94c1fe1

35 files changed

+7900
-7983
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ indent_size = 2
88
insert_final_newline = true
99
trim_trailing_whitespace = true
1010

11+
[*.ts]
12+
quote_type = single
13+
1114
[*.md]
1215
max_line_length = off
1316
trim_trailing_whitespace = false

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@
1111
/node_modules
1212

1313
# profiling files
14-
chrome-profiler-events.json
15-
speed-measure-plugin.json
14+
chrome-profiler-events*.json
1615

1716
# IDEs and editors
1817
/.idea

README.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
- Angular 7: v7.x.x
77
- Angular 8: v8.x.x
88
- Angular 9: v9.x.x
9+
- Angular 10: v10.x.x
10+
- Angular 12: v12.x.x
911

1012
Using this Module you can utilize the Monaco Editor as an Angular Component. Feel free to contribute, raise feature requests and make it better.
1113

@@ -17,7 +19,7 @@ Supports all the options available in monaco-editor [Monaco Editor Options](http
1719

1820
Install from npm repository:
1921
```
20-
npm install ngx-monaco-editor --save
22+
npm install monaco-editor ngx-monaco-editor --save
2123
```
2224

2325
For angular version 6 use v6.x.x
@@ -31,7 +33,7 @@ Add the glob to assets in `.angular-cli.json` schema - `projects.[project-name].
3133
"options": {
3234
{
3335
"assets": [
34-
{ "glob": "**/*", "input": "node_modules/ngx-monaco-editor/assets/monaco", "output": "./assets/monaco/" }
36+
{ "glob": "**/*", "input": "node_modules/monaco-editor", "output": "assets/monaco-editor" }
3537
],
3638
...
3739
}
@@ -179,7 +181,7 @@ import { MonacoEditorModule, NgxMonacoEditorConfig } from 'ngx-monaco-editor';
179181
import { AppComponent } from './app.component';
180182

181183
const monacoConfig: NgxMonacoEditorConfig = {
182-
baseUrl: 'app-name/assets', // configure base path for monaco editor default: './assets'
184+
baseUrl: 'app-name/assets', // configure base path cotaining monaco-editor directory after build default: './assets'
183185
defaultOptions: { scrollBeyondLastLine: false }, // pass default options to be used
184186
onMonacoLoad: () => { console.log((<any>window).monaco); } // here monaco object will be available as window.monaco use this function to extend monaco editor functionalities.
185187
};

angular.json

Lines changed: 61 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,19 @@
44
"newProjectRoot": "projects",
55
"projects": {
66
"editor-tester": {
7-
"root": "projects/editor-tester/",
8-
"sourceRoot": "projects/editor-tester/src",
97
"projectType": "application",
8+
"schematics": {
9+
"@schematics/angular:application": {
10+
"strict": true
11+
}
12+
},
13+
"root": "projects/editor-tester",
14+
"sourceRoot": "projects/editor-tester/src",
1015
"prefix": "app",
11-
"schematics": {},
1216
"architect": {
1317
"build": {
1418
"builder": "@angular-devkit/build-angular:browser",
1519
"options": {
16-
"aot": true,
1720
"outputPath": "dist/editor-tester",
1821
"index": "projects/editor-tester/src/index.html",
1922
"main": "projects/editor-tester/src/main.ts",
@@ -24,74 +27,81 @@
2427
"projects/editor-tester/src/assets",
2528
{
2629
"glob": "**/*",
27-
"input": "node_modules/monaco-editor/min",
28-
"output": "./assets/monaco/"
30+
"input": "node_modules/monaco-editor",
31+
"output": "assets/monaco-editor"
2932
}
3033
],
3134
"styles": [
3235
"projects/editor-tester/src/styles.css"
3336
],
34-
"scripts": [],
35-
"es5BrowserSupport": true
37+
"scripts": []
3638
},
3739
"configurations": {
3840
"production": {
39-
"fileReplacements": [
40-
{
41-
"replace": "projects/editor-tester/src/environments/environment.ts",
42-
"with": "projects/editor-tester/src/environments/environment.prod.ts"
43-
}
44-
],
45-
"optimization": true,
46-
"outputHashing": "all",
47-
"sourceMap": false,
48-
"extractCss": true,
49-
"namedChunks": false,
50-
"aot": true,
51-
"extractLicenses": true,
52-
"vendorChunk": false,
53-
"buildOptimizer": true,
5441
"budgets": [
5542
{
5643
"type": "initial",
57-
"maximumWarning": "2mb",
58-
"maximumError": "5mb"
44+
"maximumWarning": "500kb",
45+
"maximumError": "1mb"
5946
},
6047
{
6148
"type": "anyComponentStyle",
62-
"maximumWarning": "6kb"
49+
"maximumWarning": "2kb",
50+
"maximumError": "4kb"
51+
}
52+
],
53+
"fileReplacements": [
54+
{
55+
"replace": "projects/editor-tester/src/environments/environment.ts",
56+
"with": "projects/editor-tester/src/environments/environment.prod.ts"
6357
}
64-
]
58+
],
59+
"outputHashing": "all"
60+
},
61+
"development": {
62+
"buildOptimizer": false,
63+
"optimization": false,
64+
"vendorChunk": true,
65+
"extractLicenses": false,
66+
"sourceMap": true,
67+
"namedChunks": true
6568
}
66-
}
69+
},
70+
"defaultConfiguration": "production"
6771
},
6872
"serve": {
6973
"builder": "@angular-devkit/build-angular:dev-server",
70-
"options": {
71-
"browserTarget": "editor-tester:build"
72-
},
7374
"configurations": {
7475
"production": {
7576
"browserTarget": "editor-tester:build:production"
77+
},
78+
"development": {
79+
"browserTarget": "editor-tester:build:development"
7680
}
77-
}
81+
},
82+
"defaultConfiguration": "development"
7883
},
7984
"extract-i18n": {
8085
"builder": "@angular-devkit/build-angular:extract-i18n",
8186
"options": {
8287
"browserTarget": "editor-tester:build"
8388
}
8489
},
85-
"lint": {
86-
"builder": "@angular-devkit/build-angular:tslint",
90+
"test": {
91+
"builder": "@angular-devkit/build-angular:karma",
8792
"options": {
88-
"tsConfig": [
89-
"projects/editor-tester/tsconfig.app.json",
90-
"projects/editor-tester/tsconfig.spec.json"
93+
"main": "projects/editor-tester/src/test.ts",
94+
"polyfills": "projects/editor-tester/src/polyfills.ts",
95+
"tsConfig": "projects/editor-tester/tsconfig.spec.json",
96+
"karmaConfig": "projects/editor-tester/karma.conf.js",
97+
"assets": [
98+
"projects/editor-tester/src/favicon.ico",
99+
"projects/editor-tester/src/assets"
100+
],
101+
"styles": [
102+
"projects/editor-tester/src/styles.css"
91103
],
92-
"exclude": [
93-
"**/node_modules/**"
94-
]
104+
"scripts": []
95105
}
96106
}
97107
}
@@ -103,27 +113,26 @@
103113
"prefix": "ngx-monaco",
104114
"architect": {
105115
"build": {
106-
"builder": "@angular-devkit/build-ng-packagr:build",
116+
"builder": "@angular-devkit/build-angular:ng-packagr",
107117
"options": {
108-
"tsConfig": "projects/editor/tsconfig.lib.json",
109118
"project": "projects/editor/ng-package.json"
110119
},
111120
"configurations": {
112121
"production": {
113122
"tsConfig": "projects/editor/tsconfig.lib.prod.json"
123+
},
124+
"development": {
125+
"tsConfig": "projects/editor/tsconfig.lib.json"
114126
}
115-
}
127+
},
128+
"defaultConfiguration": "production"
116129
},
117-
"lint": {
118-
"builder": "@angular-devkit/build-angular:tslint",
130+
"test": {
131+
"builder": "@angular-devkit/build-angular:karma",
119132
"options": {
120-
"tsConfig": [
121-
"projects/editor/tsconfig.lib.json",
122-
"projects/editor/tsconfig.spec.json"
123-
],
124-
"exclude": [
125-
"**/node_modules/**"
126-
]
133+
"main": "projects/editor/src/test.ts",
134+
"tsConfig": "projects/editor/tsconfig.spec.json",
135+
"karmaConfig": "projects/editor/karma.conf.js"
127136
}
128137
}
129138
}
File renamed without changes.

0 commit comments

Comments
 (0)