mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 19:42:56 +01:00
Fix samples (microsoft/monaco-editor#2212)
This commit is contained in:
parent
c5586a25cf
commit
9a7dd62fff
6 changed files with 13 additions and 12 deletions
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "helloworld",
|
"name": "helloworld",
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"simpleserver": "../node_modules/.bin/yaserver --root ./dist --port 9999",
|
"simpleserver": "node ../node_modules/yaserver/bin/yaserver --root ./dist --port 9999",
|
||||||
"build": "npm run build-index && npm run build-json && npm run build-css && npm run build-html && npm run build-ts && npm run build-worker",
|
"build": "npm run build-index && npm run build-json && npm run build-css && npm run build-html && npm run build-ts && npm run build-worker",
|
||||||
"build-index": "parcel build src/index.html",
|
"build-index": "parcel build src/index.html",
|
||||||
"build-json": "parcel build ../node_modules/monaco-editor/esm/vs/language/json/json.worker.js --no-source-maps",
|
"build-json": "parcel build ../node_modules/monaco-editor/esm/vs/language/json/json.worker.js --no-source-maps",
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ self.MonacoEnvironment = {
|
||||||
if (label === 'json') {
|
if (label === 'json') {
|
||||||
return './json.worker.js';
|
return './json.worker.js';
|
||||||
}
|
}
|
||||||
if (label === 'css') {
|
if (label === 'css' || label === 'scss' || label === 'less') {
|
||||||
return './css.worker.js';
|
return './css.worker.js';
|
||||||
}
|
}
|
||||||
if (label === 'html') {
|
if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
||||||
return './html.worker.js';
|
return './html.worker.js';
|
||||||
}
|
}
|
||||||
if (label === 'typescript' || label === 'javascript') {
|
if (label === 'typescript' || label === 'javascript') {
|
||||||
|
|
@ -20,5 +20,6 @@ self.MonacoEnvironment = {
|
||||||
|
|
||||||
monaco.editor.create(document.getElementById('container'), {
|
monaco.editor.create(document.getElementById('container'), {
|
||||||
value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
|
value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
|
||||||
language: 'javascript'
|
// language: 'javascript'
|
||||||
|
language: 'scss'
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -133,10 +133,10 @@ self.MonacoEnvironment = {
|
||||||
// if (label === 'json') {
|
// if (label === 'json') {
|
||||||
// return './json.worker.bundle.js';
|
// return './json.worker.bundle.js';
|
||||||
// }
|
// }
|
||||||
// if (label === 'css') {
|
// if (label === 'css' || label === 'scss' || label === 'less') {
|
||||||
// return './css.worker.bundle.js';
|
// return './css.worker.bundle.js';
|
||||||
// }
|
// }
|
||||||
// if (label === 'html') {
|
// if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
||||||
// return './html.worker.bundle.js';
|
// return './html.worker.bundle.js';
|
||||||
// }
|
// }
|
||||||
// if (label === 'typescript' || label === 'javascript') {
|
// if (label === 'typescript' || label === 'javascript') {
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ self.MonacoEnvironment = {
|
||||||
if (label === 'json') {
|
if (label === 'json') {
|
||||||
return './json.worker.bundle.js';
|
return './json.worker.bundle.js';
|
||||||
}
|
}
|
||||||
if (label === 'css') {
|
if (label === 'css' || label === 'scss' || label === 'less') {
|
||||||
return './css.worker.bundle.js';
|
return './css.worker.bundle.js';
|
||||||
}
|
}
|
||||||
if (label === 'html') {
|
if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
||||||
return './html.worker.bundle.js';
|
return './html.worker.bundle.js';
|
||||||
}
|
}
|
||||||
if (label === 'typescript' || label === 'javascript') {
|
if (label === 'typescript' || label === 'javascript') {
|
||||||
|
|
|
||||||
|
|
@ -7,10 +7,10 @@ self.MonacoEnvironment = {
|
||||||
if (label === 'json') {
|
if (label === 'json') {
|
||||||
return './json.worker.bundle.js';
|
return './json.worker.bundle.js';
|
||||||
}
|
}
|
||||||
if (label === 'css') {
|
if (label === 'css' || label === 'scss' || label === 'less') {
|
||||||
return './css.worker.bundle.js';
|
return './css.worker.bundle.js';
|
||||||
}
|
}
|
||||||
if (label === 'html') {
|
if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
||||||
return './html.worker.bundle.js';
|
return './html.worker.bundle.js';
|
||||||
}
|
}
|
||||||
if (label === 'typescript' || label === 'javascript') {
|
if (label === 'typescript' || label === 'javascript') {
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,10 @@ self.MonacoEnvironment = {
|
||||||
if (label === 'json') {
|
if (label === 'json') {
|
||||||
return './json.worker.bundle.js';
|
return './json.worker.bundle.js';
|
||||||
}
|
}
|
||||||
if (label === 'css') {
|
if (label === 'css' || label === 'scss' || label === 'less') {
|
||||||
return './css.worker.bundle.js';
|
return './css.worker.bundle.js';
|
||||||
}
|
}
|
||||||
if (label === 'html') {
|
if (label === 'html' || label === 'handlebars' || label === 'razor') {
|
||||||
return './html.worker.bundle.js';
|
return './html.worker.bundle.js';
|
||||||
}
|
}
|
||||||
if (label === 'typescript' || label === 'javascript') {
|
if (label === 'typescript' || label === 'javascript') {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue