Skip to content

Commit

Permalink
Merge pull request #216 from atularen/12.x.x
Browse files Browse the repository at this point in the history
12.x.x
  • Loading branch information
atu1kr authored May 16, 2021
2 parents 5f3fc50 + 74bed56 commit 94c1fe1
Show file tree
Hide file tree
Showing 35 changed files with 7,900 additions and 7,983 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
/node_modules

# profiling files
chrome-profiler-events.json
speed-measure-plugin.json
chrome-profiler-events*.json

# IDEs and editors
/.idea
Expand Down
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
- Angular 7: v7.x.x
- Angular 8: v8.x.x
- Angular 9: v9.x.x
- Angular 10: v10.x.x
- Angular 12: v12.x.x

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

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

Install from npm repository:
```
npm install ngx-monaco-editor --save
npm install monaco-editor ngx-monaco-editor --save
```

For angular version 6 use v6.x.x
Expand All @@ -31,7 +33,7 @@ Add the glob to assets in `.angular-cli.json` schema - `projects.[project-name].
"options": {
{
"assets": [
{ "glob": "**/*", "input": "node_modules/ngx-monaco-editor/assets/monaco", "output": "./assets/monaco/" }
{ "glob": "**/*", "input": "node_modules/monaco-editor", "output": "assets/monaco-editor" }
],
...
}
Expand Down Expand Up @@ -179,7 +181,7 @@ import { MonacoEditorModule, NgxMonacoEditorConfig } from 'ngx-monaco-editor';
import { AppComponent } from './app.component';
const monacoConfig: NgxMonacoEditorConfig = {
baseUrl: 'app-name/assets', // configure base path for monaco editor default: './assets'
baseUrl: 'app-name/assets', // configure base path cotaining monaco-editor directory after build default: './assets'
defaultOptions: { scrollBeyondLastLine: false }, // pass default options to be used
onMonacoLoad: () => { console.log((<any>window).monaco); } // here monaco object will be available as window.monaco use this function to extend monaco editor functionalities.
};
Expand Down
113 changes: 61 additions & 52 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,19 @@
"newProjectRoot": "projects",
"projects": {
"editor-tester": {
"root": "projects/editor-tester/",
"sourceRoot": "projects/editor-tester/src",
"projectType": "application",
"schematics": {
"@schematics/angular:application": {
"strict": true
}
},
"root": "projects/editor-tester",
"sourceRoot": "projects/editor-tester/src",
"prefix": "app",
"schematics": {},
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"aot": true,
"outputPath": "dist/editor-tester",
"index": "projects/editor-tester/src/index.html",
"main": "projects/editor-tester/src/main.ts",
Expand All @@ -24,74 +27,81 @@
"projects/editor-tester/src/assets",
{
"glob": "**/*",
"input": "node_modules/monaco-editor/min",
"output": "./assets/monaco/"
"input": "node_modules/monaco-editor",
"output": "assets/monaco-editor"
}
],
"styles": [
"projects/editor-tester/src/styles.css"
],
"scripts": [],
"es5BrowserSupport": true
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "projects/editor-tester/src/environments/environment.ts",
"with": "projects/editor-tester/src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"extractCss": true,
"namedChunks": false,
"aot": true,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
"maximumWarning": "500kb",
"maximumError": "1mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb"
"maximumWarning": "2kb",
"maximumError": "4kb"
}
],
"fileReplacements": [
{
"replace": "projects/editor-tester/src/environments/environment.ts",
"with": "projects/editor-tester/src/environments/environment.prod.ts"
}
]
],
"outputHashing": "all"
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
}
},
"defaultConfiguration": "production"
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "editor-tester:build"
},
"configurations": {
"production": {
"browserTarget": "editor-tester:build:production"
},
"development": {
"browserTarget": "editor-tester:build:development"
}
}
},
"defaultConfiguration": "development"
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "editor-tester:build"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"tsConfig": [
"projects/editor-tester/tsconfig.app.json",
"projects/editor-tester/tsconfig.spec.json"
"main": "projects/editor-tester/src/test.ts",
"polyfills": "projects/editor-tester/src/polyfills.ts",
"tsConfig": "projects/editor-tester/tsconfig.spec.json",
"karmaConfig": "projects/editor-tester/karma.conf.js",
"assets": [
"projects/editor-tester/src/favicon.ico",
"projects/editor-tester/src/assets"
],
"styles": [
"projects/editor-tester/src/styles.css"
],
"exclude": [
"**/node_modules/**"
]
"scripts": []
}
}
}
Expand All @@ -103,27 +113,26 @@
"prefix": "ngx-monaco",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"builder": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/editor/tsconfig.lib.json",
"project": "projects/editor/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/editor/tsconfig.lib.prod.json"
},
"development": {
"tsConfig": "projects/editor/tsconfig.lib.json"
}
}
},
"defaultConfiguration": "production"
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"tsConfig": [
"projects/editor/tsconfig.lib.json",
"projects/editor/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
"main": "projects/editor/src/test.ts",
"tsConfig": "projects/editor/tsconfig.spec.json",
"karmaConfig": "projects/editor/karma.conf.js"
}
}
}
Expand Down
File renamed without changes.
Loading

0 comments on commit 94c1fe1

Please sign in to comment.