Upgrade to gulp 4

This commit is contained in:
Alex Dima 2019-02-19 11:16:39 +01:00
parent 70e48eeb52
commit 440404716e
4 changed files with 1954 additions and 674 deletions

View file

@ -40,8 +40,8 @@ loadEditor(function() {
monaco.languages.register({ id: 'mySpecialLanguage' });
monaco.languages.registerHoverProvider('mySpecialLanguage', {
provideHover: function(model, position) {
return xhr('../playground.html').then(function(res) {
provideHover: function (model, position) {
return xhr('../playground.html').then(function (res) {
return {
range: new monaco.Range(1, 1, model.getLineCount(), model.getLineMaxColumn(model.getLineCount())),
contents: [
@ -60,7 +60,7 @@ monaco.editor.create(document.getElementById("container"), {
function xhr(url) {
var req = null;
return new Promise(function(c,e) {
return new Promise(function (c, e) {
req = new XMLHttpRequest();
req.onreadystatechange = function () {
if (req._canceled) { return; }
@ -75,7 +75,7 @@ function xhr(url) {
}
};
req.open("GET", url, true );
req.open("GET", url, true);
req.responseType = "";
req.send(null);
@ -90,4 +90,4 @@ function xhr(url) {
});
</script>
</body>
</html>
</html>