Merge pull request #70 from remcohaszing/demo-metadata

Update metadata
This commit is contained in:
Remco Haszing 2021-08-09 21:42:47 +02:00 committed by GitHub
commit f5fc412497
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 9 deletions

View file

@ -3,6 +3,8 @@
[![ci workflow](https://github.com/remcohaszing/monaco-yaml/actions/workflows/ci.yaml/badge.svg)](https://github.com/remcohaszing/monaco-yaml/actions/workflows/ci.yaml)
[![npm version](https://img.shields.io/npm/v/monaco-yaml)](https://www.npmjs.com/package/monaco-yaml)
[![prettier code style](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://prettier.io)
[![demo](https://img.shields.io/badge/demo-monaco--yaml.js.org-61ffcf.svg)](https://monaco-yaml.js.org)
[![netlify status](https://api.netlify.com/api/v1/badges/20b08937-99d0-4882-b9a3-d5f09ddd29b7/deploy-status)](https://app.netlify.com/sites/monaco-yaml/deploys)
YAML language plugin for the Monaco Editor. It provides the following features when editing YAML
files:
@ -86,6 +88,8 @@ Also make sure to register the web worker.
## Examples
A demo is available on [monaco-yaml.js.org](https://monaco-yaml.js.org).
A running example: ![demo-image](test-demo.png)
Some usage examples can be found in the

View file

@ -1,7 +1,8 @@
# Webpack entry points demo
# Demo
This demo shows how to use `monaco-editor` and `monaco-yaml` with Webpack 4
[entry points](https://webpack.js.org/concepts/entry-points). To start it, simply run:
This demo is deployed to [monaco-yaml.js.org](https://monaco-yaml.js.org). It shows how
`monaco-editor` and `monaco-yaml` can be used with
[Webpack 5](https://webpack.js.org/concepts/entry-points). To start it, simply run:
```sh
npm start

View file

@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 512 470.647">
<style>
@media (prefers-color-scheme: dark) {
.char {
fill: #ffffff;
}
}
</style>
<polygon class="char" points="512 422.735 395.638 422.735 395.638 250.125 347.442 250.125 347.442 469.647 512 469.647 512 422.737 512 422.735" />
<polygon class="char" points="87.701 250.177 87.701 470.647 135.004 470.647 135.004 318.569 184.509 420.789 221.743 420.789 272.939 314.976 272.939 470.602 318.318 470.602 318.318 250.177 256.358 250.177 201.381 349.883 149.021 250.177 87.701 250.177 87.701 250.177" />
<path fill="#cb171e" d="M330.294,195.39H228.433l-20.717,50.024H162.61L257.99,20.465h46.137l91.51,224.949h-48.2L330.293,195.39Zm-16.92-44.911-31.226-82.55-34.837,82.55h66.063Z" transform="translate(0 -19.939)" />
<polygon class="char" points="235.793 0 143.978 137.674 143.978 224.949 87.702 224.949 87.702 137.674 0 0 63.25 0 119.018 88.646 175.243 0 235.793 0 235.793 0" />
</svg>

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -2,6 +2,7 @@
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" type="image/svg+xml" href="<%= require('./icon.svg') %>" />
<title>Monaco YAML</title>
</head>
<body>

View file

@ -10,14 +10,8 @@ import 'monaco-editor';
window.MonacoEnvironment = {
getWorker(moduleId, label) {
switch (label) {
case 'css':
return new Worker(new URL('monaco-editor/esm/vs/language/css/css.worker', import.meta.url));
case 'editorWorkerService':
return new Worker(new URL('monaco-editor/esm/vs/editor/editor.worker', import.meta.url));
case 'json':
return new Worker(
new URL('monaco-editor/esm/vs/language/json/json.worker', import.meta.url),
);
case 'yaml':
return new Worker(new URL('monaco-yaml/lib/esm/yaml.worker', import.meta.url));
default:

View file

@ -2,6 +2,7 @@
"name": "monaco-yaml",
"version": "3.0.0",
"description": "YAML plugin for the Monaco Editor",
"homepage": "https://monaco-yaml.js.org",
"scripts": {
"watch": "tsc -p ./src --watch",
"compile": "rimraf ./out && tsc",