From 946f3cc91502fad42a4c6f2415b8d09119c2270f Mon Sep 17 00:00:00 2001 From: Aaron Zhou Date: Wed, 12 Oct 2016 13:13:10 -0700 Subject: [PATCH] Users/aazhou/cleanup (#7) * Fix build and update readme * Update build * Three basic grunt tasks => five basic grunt tasks * Fix issues url --- .gitignore | 3 ++- README.md | 2 +- gruntfile.js | 11 +++++------ index.html | 2 +- scripts/Controller.ts | 6 +++--- vss-extension.json | 16 ++++++++++------ 6 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.gitignore b/.gitignore index 9ffa8f4..ceb7c2e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ node_modules scripts/*.js typings -dist \ No newline at end of file +dist +*.vsix \ No newline at end of file diff --git a/README.md b/README.md index cdd5a1b..30df5e9 100644 --- a/README.md +++ b/README.md @@ -177,7 +177,7 @@ vss-extension.json - Extension manifest #### Grunt #### -Three basic `grunt` tasks are defined: +Five basic `grunt` tasks are defined: * `build` - Compiles TS files in `scripts` folder * `package-dev` - Builds the development version of the vsix package diff --git a/gruntfile.js b/gruntfile.js index 6a15c64..8563795 100644 --- a/gruntfile.js +++ b/gruntfile.js @@ -2,8 +2,7 @@ grunt.initConfig({ ts: { build: { - tsconfig: true, - "outDir": "./dist" + tsconfig: true }, buildTest: { tsconfig: true, @@ -16,22 +15,22 @@ }, exec: { package_dev: { - command: "tfx extension create --root dist --manifest-globs vss-extension.json --overrides-file configs/dev.json", + command: "tfx extension create --manifest-globs vss-extension.json --overrides-file configs/dev.json", stdout: true, stderr: true }, package_release: { - command: "tfx extension create --root dist --manifest-globs vss-extension.json --overrides-file configs/release.json", + command: "tfx extension create --manifest-globs vss-extension.json --overrides-file configs/release.json", stdout: true, stderr: true }, publish_dev: { - command: "tfx extension publish --service-url https://marketplace.visualstudio.com --root dist --manifest-globs vss-extension.json --overrides-file configs/dev.json", + command: "tfx extension publish --service-url https://marketplace.visualstudio.com --manifest-globs vss-extension.json --overrides-file configs/dev.json", stdout: true, stderr: true }, publish_release: { - command: "tfx extension publish --service-url https://marketplace.visualstudio.com --root dist --manifest-globs vss-extension.json --overrides-file configs/release.json", + command: "tfx extension publish --service-url https://marketplace.visualstudio.com --manifest-globs vss-extension.json --overrides-file configs/release.json", stdout: true, stderr: true } diff --git a/index.html b/index.html index f6809c0..487e51b 100644 --- a/index.html +++ b/index.html @@ -18,7 +18,7 @@ }); // Load main entry point for extension - VSS.require(["dist/app"], function () { + VSS.require(["scripts/app"], function () { // loading succeeded VSS.notifyLoadSucceeded(); }); diff --git a/scripts/Controller.ts b/scripts/Controller.ts index 1d20584..15aa94f 100644 --- a/scripts/Controller.ts +++ b/scripts/Controller.ts @@ -27,7 +27,7 @@ export class Controller { this._initialize(); } private _initialize(): void { - this._inputs = VSS.getConfiguration().witInputs + this._inputs = VSS.getConfiguration().witInputs; this._fieldName = InputParser.getFieldName(this._inputs); WitService.WorkItemFormService.getService().then( (service) => { @@ -58,9 +58,9 @@ export class Controller { for (let field of fields) { if (field.referenceName === fieldname) { if (field.type === FieldType.Boolean) { - return { isBoolean: true, fieldLabel: field.name } + return { isBoolean: true, fieldLabel: field.name }; } - return { isBoolean: false, fieldLabel: field.name } + return { isBoolean: false, fieldLabel: field.name }; } } throw "Field not found."; diff --git a/vss-extension.json b/vss-extension.json index e4f1293..c56be8d 100644 --- a/vss-extension.json +++ b/vss-extension.json @@ -1,7 +1,7 @@ { "manifestVersion": 1, "id": "toggle-control", - "version": "0.1.1", + "version": "0.1.2", "name": "Toggle Control", "scopes": [ "vso.work", @@ -10,7 +10,7 @@ "description": "Add a toggle control to a work item type.", "publisher": "ms-devlabs", "icons": { - "default": "img/control.PNG" + "default": "img/control.png" }, "targets": [ { @@ -28,16 +28,16 @@ }, "links": { "learn": { - "uri": "https://github.com/Microsoft/vsts-toggle-wit-custom-control/blob/master/README.md" + "uri": "https://github.com/Microsoft/vsts-extension-toggle-control/blob/master/README.md" }, "support": { - "uri": "https://github.com/Microsoft/vsts-toggle-wit-custom-control" + "uri": "https://github.com/Microsoft/vsts-extension-toggle-control" }, "repository": { - "uri": "https://github.com/Microsoft/vsts-toggle-wit-custom-control" + "uri": "https://github.com/Microsoft/vsts-extension-toggle-control" }, "issues": { - "uri": "https://github.com/Microsoft/vsts-toggle-wit-custom-control/issues" + "uri": "https://github.com/Microsoft/vsts-extension-toggle-control/issues" } }, "branding": { @@ -53,6 +53,10 @@ "path": "dist", "addressable": true }, + { + "path": "scripts", + "addressable": true + }, { "path": "styles", "addressable": true