web - scaffold a basic dev setup via "yarn web"

This commit is contained in:
Benjamin Pasero
2019-05-09 13:13:27 +02:00
parent 7006ca0772
commit 4b5c68c1bd
16 changed files with 197 additions and 112 deletions

View 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>

View 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);
});
});
})();