Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GH-3985: Support for css/html via VS Code extension #7972

Merged
merged 2 commits into from
Jun 11, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -72,22 +72,12 @@ const { mode, staticCompression } = yargs.option('mode', {
}).argv;
const development = mode === 'development';${this.ifMonaco(() => `

const monacoEditorCorePath = development ? '${this.resolve('@theia/monaco-editor-core', 'dev/vs')}' : '${this.resolve('@theia/monaco-editor-core', 'min/vs')}';
const monacoCssLanguagePath = '${this.resolve('monaco-css', 'release/min')}';
const monacoHtmlLanguagePath = '${this.resolve('monaco-html', 'release/min')}';`)}
const monacoEditorCorePath = development ? '${this.resolve('@theia/monaco-editor-core', 'dev/vs')}' : '${this.resolve('@theia/monaco-editor-core', 'min/vs')}';`)}

const plugins = [new CopyWebpackPlugin([${this.ifMonaco(() => `
{
from: monacoEditorCorePath,
to: 'vs'
},
{
from: monacoCssLanguagePath,
to: 'vs/language/css'
},
{
from: monacoHtmlLanguagePath,
to: 'vs/language/html'
}`)}
])];
// it should go after copy-plugin in order to compress monaco as well
Expand Down
2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
"vscode-builtin-cpp": "https://open-vsx.org/api/vscode/cpp/1.44.2/file/vscode.cpp-1.44.2.vsix",
"vscode-builtin-csharp": "https://open-vsx.org/api/vscode/csharp/1.44.2/file/vscode.csharp-1.44.2.vsix",
"vscode-builtin-css": "https://open-vsx.org/api/vscode/css/1.44.2/file/vscode.css-1.44.2.vsix",
"vscode-builtin-css-language-features": "https://open-vsx.org/api/vscode/css-language-features/1.45.1/file/vscode.css-language-features-1.45.1.vsix",
"vscode-builtin-debug-auto-launch": "https://open-vsx.org/api/vscode/debug-auto-launch/1.44.2/file/vscode.debug-auto-launch-1.44.2.vsix",
"vscode-builtin-docker": "https://open-vsx.org/api/vscode/docker/1.44.2/file/vscode.docker-1.44.2.vsix",
"vscode-builtin-emmet": "https://open-vsx.org/api/vscode/emmet/1.44.2/file/vscode.emmet-1.44.2.vsix",
Expand All @@ -98,6 +99,7 @@
"vscode-builtin-handlebars": "https://open-vsx.org/api/vscode/handlebars/1.44.2/file/vscode.handlebars-1.44.2.vsix",
"vscode-builtin-hlsl": "https://open-vsx.org/api/vscode/hlsl/1.44.2/file/vscode.hlsl-1.44.2.vsix",
"vscode-builtin-html": "https://open-vsx.org/api/vscode/html/1.44.2/file/vscode.html-1.44.2.vsix",
"vscode-builtin-html-language-features": "https://open-vsx.org/api/vscode/html-language-features/1.45.1/file/vscode.html-language-features-1.45.1.vsix",
"vscode-builtin-ini": "https://open-vsx.org/api/vscode/ini/1.44.2/file/vscode.ini-1.44.2.vsix",
"vscode-builtin-jake": "https://open-vsx.org/api/vscode/jake/1.44.2/file/vscode.jake-1.44.2.vsix",
"vscode-builtin-java": "https://open-vsx.org/api/vscode/java/1.44.2/file/vscode.java-1.44.2.vsix",
Expand Down
2 changes: 1 addition & 1 deletion packages/monaco/src/browser/monaco-editor-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export class MonacoEditorService extends monaco.services.CodeEditorServiceImpl {
return undefined;
}
if (ApplicationShell.TrackableWidgetProvider.is(widget)) {
for (const childWidget of await widget.getTrackableWidgets()) {
for (const childWidget of widget.getTrackableWidgets()) {
const editorWidget = await this.findEditorWidgetByUri(childWidget, uriAsString);
if (editorWidget) {
return editorWidget;
Expand Down
4 changes: 1 addition & 3 deletions packages/monaco/src/browser/monaco-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ export function loadMonaco(vsRequire: any): Promise<void> {
return new Promise<void>(resolve => {
vsRequire(['vs/editor/editor.main'], () => {
vsRequire([
'vs/language/css/monaco.contribution',
'vs/language/html/monaco.contribution',
'vs/platform/commands/common/commands',
'vs/platform/actions/common/actions',
'vs/platform/keybinding/common/keybindingsRegistry',
Expand Down Expand Up @@ -78,7 +76,7 @@ export function loadMonaco(vsRequire: any): Promise<void> {
'vs/platform/contextkey/common/contextkey',
'vs/platform/contextkey/browser/contextKeyService',
'vs/base/common/errors'
], (css: any, html: any, commands: any, actions: any,
], (commands: any, actions: any,
keybindingsRegistry: any, keybindingResolver: any, resolvedKeybinding: any, keybindingLabels: any,
keyCodes: any, mime: any, editorExtensions: any, simpleServices: any,
standaloneServices: any, standaloneLanguages: any, quickOpenWidget: any, quickOpenModel: any,
Expand Down