* Fix build and update readme

* Update build

* Three basic grunt tasks => five basic grunt tasks

* Fix issues url
This commit is contained in:
Aaron Zhou 2016-10-12 13:13:10 -07:00 коммит произвёл GitHub
Родитель dc9957b1c8
Коммит 946f3cc915
6 изменённых файлов: 22 добавлений и 18 удалений

1
.gitignore поставляемый
Просмотреть файл

@ -2,3 +2,4 @@ node_modules
scripts/*.js
typings
dist
*.vsix

Просмотреть файл

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

Просмотреть файл

@ -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
}

Просмотреть файл

@ -18,7 +18,7 @@
});
// Load main entry point for extension
VSS.require(["dist/app"], function () {
VSS.require(["scripts/app"], function () {
// loading succeeded
VSS.notifyLoadSucceeded();
});

Просмотреть файл

@ -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.";

Просмотреть файл

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