pull/2748/head
Alexandru Dima 2020-12-24 13:51:58 +01:00
parent c5586a25cf
commit 9a7dd62fff
No known key found for this signature in database
GPG Key ID: 6E58D7B045760DA0
6 changed files with 13 additions and 12 deletions

View File

@ -2,7 +2,7 @@
"name": "helloworld",
"dependencies": {},
"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-index": "parcel build src/index.html",
"build-json": "parcel build ../node_modules/monaco-editor/esm/vs/language/json/json.worker.js --no-source-maps",

View File

@ -5,10 +5,10 @@ self.MonacoEnvironment = {
if (label === 'json') {
return './json.worker.js';
}
if (label === 'css') {
if (label === 'css' || label === 'scss' || label === 'less') {
return './css.worker.js';
}
if (label === 'html') {
if (label === 'html' || label === 'handlebars' || label === 'razor') {
return './html.worker.js';
}
if (label === 'typescript' || label === 'javascript') {
@ -20,5 +20,6 @@ self.MonacoEnvironment = {
monaco.editor.create(document.getElementById('container'), {
value: ['function x() {', '\tconsole.log("Hello world!");', '}'].join('\n'),
language: 'javascript'
// language: 'javascript'
language: 'scss'
});

View File

@ -133,10 +133,10 @@ self.MonacoEnvironment = {
// if (label === 'json') {
// return './json.worker.bundle.js';
// }
// if (label === 'css') {
// if (label === 'css' || label === 'scss' || label === 'less') {
// return './css.worker.bundle.js';
// }
// if (label === 'html') {
// if (label === 'html' || label === 'handlebars' || label === 'razor') {
// return './html.worker.bundle.js';
// }
// if (label === 'typescript' || label === 'javascript') {

View File

@ -7,10 +7,10 @@ self.MonacoEnvironment = {
if (label === 'json') {
return './json.worker.bundle.js';
}
if (label === 'css') {
if (label === 'css' || label === 'scss' || label === 'less') {
return './css.worker.bundle.js';
}
if (label === 'html') {
if (label === 'html' || label === 'handlebars' || label === 'razor') {
return './html.worker.bundle.js';
}
if (label === 'typescript' || label === 'javascript') {

View File

@ -7,10 +7,10 @@ self.MonacoEnvironment = {
if (label === 'json') {
return './json.worker.bundle.js';
}
if (label === 'css') {
if (label === 'css' || label === 'scss' || label === 'less') {
return './css.worker.bundle.js';
}
if (label === 'html') {
if (label === 'html' || label === 'handlebars' || label === 'razor') {
return './html.worker.bundle.js';
}
if (label === 'typescript' || label === 'javascript') {

View File

@ -5,10 +5,10 @@ self.MonacoEnvironment = {
if (label === 'json') {
return './json.worker.bundle.js';
}
if (label === 'css') {
if (label === 'css' || label === 'scss' || label === 'less') {
return './css.worker.bundle.js';
}
if (label === 'html') {
if (label === 'html' || label === 'handlebars' || label === 'razor') {
return './html.worker.bundle.js';
}
if (label === 'typescript' || label === 'javascript') {