mirror of
https://github.com/microsoft/vscode.git
synced 2026-05-03 23:06:49 +01:00
web - scaffold a basic dev setup via "yarn web"
This commit is contained in:
12
src/vs/code/browser/workbench/workbench.html
Normal file
12
src/vs/code/browser/workbench/workbench.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
</head>
|
||||
<body class="vs-dark" aria-label="">
|
||||
</body>
|
||||
|
||||
<!-- Startup via workbench.js -->
|
||||
<script src="../../../../../out/vs/code/browser/workbench/workbench.js"></script>
|
||||
</html>
|
||||
40
src/vs/code/browser/workbench/workbench.js
Normal file
40
src/vs/code/browser/workbench/workbench.js
Normal file
@@ -0,0 +1,40 @@
|
||||
/*---------------------------------------------------------------------------------------------
|
||||
* Copyright (c) Microsoft Corporation. All rights reserved.
|
||||
* Licensed under the MIT License. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
//@ts-check
|
||||
'use strict';
|
||||
|
||||
(function () {
|
||||
|
||||
function loadScript(path, callback) {
|
||||
let script = document.createElement('script');
|
||||
script.onload = callback;
|
||||
script.async = true;
|
||||
script.type = 'text/javascript';
|
||||
script.src = path;
|
||||
document.head.appendChild(script);
|
||||
}
|
||||
|
||||
loadScript('../../../../../out/vs/loader.js', function () {
|
||||
|
||||
// @ts-ignore
|
||||
require.config({
|
||||
baseUrl: `${window.location.origin}/out`
|
||||
});
|
||||
|
||||
// @ts-ignore
|
||||
require([
|
||||
'vs/workbench/workbench.web.main',
|
||||
'vs/nls!vs/workbench/workbench.web.main',
|
||||
'vs/css!vs/workbench/workbench.web.main'
|
||||
],
|
||||
// @ts-ignore
|
||||
function () {
|
||||
|
||||
// @ts-ignore
|
||||
require('vs/workbench/browser/web.main').main().then(undefined, console.error);
|
||||
});
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user