Skip to content

Commit b6aaa42

Browse files
authored
chore: integration with monaco-yaml (#58)
1 parent d9d9c5c commit b6aaa42

File tree

4 files changed

+977
-978
lines changed

4 files changed

+977
-978
lines changed

.storybook/main.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ export default {
1515
config.plugins!.push(
1616
new MonacoEditorWebpackPlugin({
1717
languages: ['yaml'],
18+
globalAPI: true,
19+
customLanguages: [
20+
{
21+
label: 'yaml',
22+
entry: '../../monaco-yaml/lib/esm/monaco.contribution',
23+
worker: {
24+
id: 'vs/language/yaml/yamlWorker',
25+
entry: '../../monaco-yaml/lib/esm/yaml.worker.js',
26+
},
27+
},
28+
],
1829
}),
1930
);
2031
return config;

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Angular wrapper for monaco-editor
22

3-
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/alauda/ng-monaco-editor/Publish%20package)](https://github.com/alauda/ng-monaco-editor/actions?query=workflow%3A%22Publish+package%22)
3+
[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/alauda/ng-monaco-editor/Publish%20package)](https://github.com/alauda/ng-monaco-editor/actions/workflows/publish.yml)
44
[![npm](https://img.shields.io/npm/v/ng-monaco-editor)](https://www.npmjs.com/package/ng-monaco-editor)
55

66
## Dependencies
@@ -60,7 +60,7 @@ Most of the time, you should configure the module at the root module.
6060
/**
6161
* optional, load monaco by yourself, you'd prefer loading esm for example
6262
*/
63-
dynamicImport: () => import('monaco-editor/esm/vs/editor/editor.api'),
63+
dynamicImport: () => import('monaco-editor'),
6464

6565
/**
6666
* optional, use amd loader to load monaco if present, lower priority than `dynamicImport`

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,16 +41,18 @@
4141
"@angular/forms": "^12.0.1",
4242
"@angular/platform-browser": "^12.0.1",
4343
"@angular/platform-browser-dynamic": "^12.0.1",
44-
"@storybook/addon-actions": "^6.3.0-alpha.21",
44+
"@storybook/addon-actions": "^6.3.0-alpha.39",
4545
"@storybook/addon-knobs": "^6.3.0-alpha.21",
4646
"@storybook/addon-postcss": "^2.0.0",
47-
"@storybook/angular": "^6.3.0-alpha.21",
48-
"@storybook/builder-webpack5": "^6.2.9",
49-
"@storybook/cli": "^6.3.0-alpha.21",
47+
"@storybook/angular": "^6.3.0-alpha.39",
48+
"@storybook/builder-webpack5": "^6.3.0-alpha.39",
49+
"@storybook/cli": "^6.3.0-alpha.39",
50+
"@storybook/manager-webpack5": "^6.3.0-alpha.39",
5051
"@types/lodash-es": "^4.17.4",
5152
"lodash-es": "^4.17.21",
5253
"monaco-editor": "^0.24.0",
5354
"monaco-editor-webpack-plugin": "^3.1.0",
55+
"monaco-yaml": "^2.5.1",
5456
"ng-packagr": "^12.0.0",
5557
"npm-run-all": "^4.1.5",
5658
"postcss": "^8.3.0",

0 commit comments

Comments
 (0)