Skip to content

Instantly share code, notes, and snippets.

@davidsk
Last active July 23, 2020 12:02
Show Gist options
  • Save davidsk/d479b83f641f814f6e4cba68754d4c8e to your computer and use it in GitHub Desktop.
Save davidsk/d479b83f641f814f6e4cba68754d4c8e to your computer and use it in GitHub Desktop.
azure-devops-extension-sdk error
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- <script src="node_modules/requirejs/require.js"></script> -->
<script src="kdds-hub.js"></script>
</head>
<body>
<h1>Hello, <span id="name"></span></h1>
</body>
</html>
define(["require", "exports", "azure-devops-extension-sdk"], function (require, exports, SDK) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
SDK.init();
SDK.ready().then(function () {
document.getElementById("name").innerText = SDK.getUser().name + "!!!";
});
});
import * as SDK from "azure-devops-extension-sdk";
SDK.init();
SDK.ready().then(() => {
document.getElementById("name").innerText = SDK.getUser().name + "!!!";
});
{
"name": "kddsHub",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"azure-devops-extension-sdk": "^2.0.11",
"requirejs": "^2.3.6",
"vss-web-extension-sdk": "^5.141.0"
},
"devDependencies": {
"live-server": "^1.2.1"
}
}
{
"compilerOptions": {
"module": "amd",
"moduleResolution": "node",
"target": "es5",
"types": [
"azure-devops-extension-sdk"
],
"lib": [
"es5",
"es6",
"dom",
"es2015.promise"
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment