WIP: upgrade project
This commit is contained in:
Родитель
2efc73ab8e
Коммит
4186dde7cd
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"manifestVersion": 1,
|
"manifestVersion": 1,
|
||||||
"id": "color-form-control",
|
"id": "color-form-control",
|
||||||
"version": "1.0.3",
|
"version": "1.0.4",
|
||||||
"name": "Color picklist control",
|
"name": "Color picklist control",
|
||||||
"description": "Add custom colors and labels for picklist fields.",
|
"description": "Add custom colors and labels for picklist fields.",
|
||||||
"publisher": "ms-devlabs",
|
"publisher": "ms-devlabs",
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"categories": [
|
"categories": [
|
||||||
"Plan and track"
|
"Azure Boards"
|
||||||
],
|
],
|
||||||
"contributions": [
|
"contributions": [
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
{
|
{
|
||||||
"id": "color-control-dev",
|
"id": "color-control-dev",
|
||||||
"name": "Color Form Control (dev)",
|
"name": "Color Form Control (dev)",
|
||||||
"public": false
|
"publisher": "solidify-labs",
|
||||||
|
"public": false,
|
||||||
|
"baseUri": "https://localhost:9090"
|
||||||
}
|
}
|
79
gruntfile.js
79
gruntfile.js
|
@ -1,79 +0,0 @@
|
||||||
module.exports = function (grunt) {
|
|
||||||
grunt.initConfig({
|
|
||||||
ts: {
|
|
||||||
build: {
|
|
||||||
tsconfig: true
|
|
||||||
},
|
|
||||||
buildTest: {
|
|
||||||
tsconfig: true,
|
|
||||||
"outDir": "./test/scripts",
|
|
||||||
src: ["./scripts/**/*.tests.ts"]
|
|
||||||
},
|
|
||||||
options: {
|
|
||||||
fast: 'never'
|
|
||||||
}
|
|
||||||
},
|
|
||||||
exec: {
|
|
||||||
package_dev: {
|
|
||||||
command: "tfx extension create --manifest-globs vss-extension.json --overrides-file configs/dev.json",
|
|
||||||
stdout: true,
|
|
||||||
stderr: true
|
|
||||||
},
|
|
||||||
package_release: {
|
|
||||||
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 --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 --manifest-globs vss-extension.json --overrides-file configs/release.json",
|
|
||||||
stdout: true,
|
|
||||||
stderr: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
copy: {
|
|
||||||
scripts: {
|
|
||||||
files: [{
|
|
||||||
expand: true,
|
|
||||||
flatten: true,
|
|
||||||
src: ["node_modules/vss-web-extension-sdk/lib/VSS.SDK.min.js"],
|
|
||||||
dest: "dist",
|
|
||||||
filter: "isFile"
|
|
||||||
}]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
clean: ["scripts/**/*.js", "*.vsix", "dist", "test"],
|
|
||||||
|
|
||||||
karma: {
|
|
||||||
unit: {
|
|
||||||
configFile: 'karma.conf.js',
|
|
||||||
singleRun: true,
|
|
||||||
browsers: ["PhantomJS"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
grunt.loadNpmTasks("grunt-ts");
|
|
||||||
grunt.loadNpmTasks("grunt-exec");
|
|
||||||
grunt.loadNpmTasks("grunt-contrib-copy");
|
|
||||||
grunt.loadNpmTasks('grunt-contrib-clean');
|
|
||||||
grunt.loadNpmTasks('grunt-karma');
|
|
||||||
|
|
||||||
grunt.registerTask("build", ["ts:build", "copy:scripts"]);
|
|
||||||
|
|
||||||
grunt.registerTask("test", ["ts:buildTest", "karma:unit"]);
|
|
||||||
|
|
||||||
grunt.registerTask("package-dev", ["build", "exec:package_dev"]);
|
|
||||||
grunt.registerTask("package-release", ["build", "exec:package_release"]);
|
|
||||||
grunt.registerTask("publish-dev", ["package-dev", "exec:publish_dev"]);
|
|
||||||
grunt.registerTask("publish-release", ["package-release", "exec:publish_release"]);
|
|
||||||
|
|
||||||
grunt.registerTask("default", ["package-dev"]);
|
|
||||||
};
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
40
package.json
40
package.json
|
@ -1,15 +1,16 @@
|
||||||
{
|
{
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
"@types/jquery": "^3.5.14",
|
||||||
"@types/react": "^0.14.56",
|
"@types/react": "^0.14.56",
|
||||||
"@types/react-dom": "^0.14.20",
|
"@types/react-dom": "^0.14.20",
|
||||||
|
"@types/knockout": "3.4.72",
|
||||||
|
"@types/requirejs": "2.1.34",
|
||||||
"chai": "^3.5.0",
|
"chai": "^3.5.0",
|
||||||
"grunt": "1.5.3",
|
"copy-webpack-plugin": "^6.3.1",
|
||||||
"grunt-cli": "^1.2.0",
|
"css-loader": "^5.2.4",
|
||||||
"grunt-contrib-clean": "^1.0.0",
|
"file-loader": "^6.2.0",
|
||||||
"grunt-contrib-copy": "~1.0.0",
|
|
||||||
"grunt-exec": "~0.4.7",
|
"jquery": "^3.6.1",
|
||||||
"grunt-karma": "^2.0.0",
|
|
||||||
"grunt-ts": "^5.5.1",
|
|
||||||
"karma": "^6.3.16",
|
"karma": "^6.3.16",
|
||||||
"karma-chai": "^0.1.0",
|
"karma-chai": "^0.1.0",
|
||||||
"karma-mocha": "^1.1.1",
|
"karma-mocha": "^1.1.1",
|
||||||
|
@ -17,20 +18,15 @@
|
||||||
"karma-requirejs": "^1.0.0",
|
"karma-requirejs": "^1.0.0",
|
||||||
"mocha": "^2.5.3",
|
"mocha": "^2.5.3",
|
||||||
"requirejs": "^2.2.0",
|
"requirejs": "^2.2.0",
|
||||||
"tfx-cli": "^0.12.0",
|
|
||||||
"typescript": "^3.9.10",
|
|
||||||
"typings": "^1.0.4",
|
|
||||||
"vss-web-extension-sdk": "^5.141.0",
|
|
||||||
|
|
||||||
"webpack": "^4.46.0",
|
|
||||||
"webpack-cli": "^4.9.2",
|
|
||||||
"webpack-dev-server": "^4.9.0",
|
|
||||||
"copy-webpack-plugin": "^6.3.1",
|
|
||||||
"css-loader": "^5.2.4",
|
|
||||||
"style-loader": "^1.2.1",
|
|
||||||
"file-loader": "^6.2.0",
|
|
||||||
"rimraf": "~3.0.2",
|
"rimraf": "~3.0.2",
|
||||||
"ts-loader": "^8.0.11"
|
"style-loader": "^1.2.1",
|
||||||
|
"tfx-cli": "^0.12.0",
|
||||||
|
"ts-loader": "^8.0.11",
|
||||||
|
"typescript": "^3.9.10",
|
||||||
|
"vss-web-extension-sdk": "^5.141.0",
|
||||||
|
"webpack": "^5.72.1",
|
||||||
|
"webpack-cli": "^4.9.2",
|
||||||
|
"webpack-dev-server": "^4.9.0"
|
||||||
},
|
},
|
||||||
"name": "vsts-extension-ts-seed-simple",
|
"name": "vsts-extension-ts-seed-simple",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
@ -41,7 +37,9 @@
|
||||||
"build": "grunt build",
|
"build": "grunt build",
|
||||||
"build:dev": "npm run clean && webpack --progress",
|
"build:dev": "npm run clean && webpack --progress",
|
||||||
"build:release": "npm run clean && webpack --config webpack.prod.config.js --progress",
|
"build:release": "npm run clean && webpack --config webpack.prod.config.js --progress",
|
||||||
"postinstall": "typings install"
|
"package:dev": "tfx extension create --manifest-globs azure-devops-extension.json --overrides-file configs/dev.json",
|
||||||
|
"dev": "webpack-dev-server --hot --progress --static ./dist "
|
||||||
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"npm": "^8.12.1"
|
"npm": "^8.12.1"
|
||||||
|
|
|
@ -16,6 +16,7 @@ $(window).bind("keydown", function (event: JQueryEventObject) {
|
||||||
var control: Controller;
|
var control: Controller;
|
||||||
|
|
||||||
var provider = () => {
|
var provider = () => {
|
||||||
|
debugger
|
||||||
return {
|
return {
|
||||||
onLoaded: (workItemLoadedArgs: ExtensionContracts.IWorkItemLoadedArgs) => {
|
onLoaded: (workItemLoadedArgs: ExtensionContracts.IWorkItemLoadedArgs) => {
|
||||||
control = new Controller();
|
control = new Controller();
|
||||||
|
|
|
@ -47,7 +47,7 @@ export class Controller {
|
||||||
|
|
||||||
private _initialize(): void {
|
private _initialize(): void {
|
||||||
|
|
||||||
|
debugger
|
||||||
this._inputs = VSS.getConfiguration().witInputs;
|
this._inputs = VSS.getConfiguration().witInputs;
|
||||||
this._fieldName = InputParser.getFieldName(this._inputs);
|
this._fieldName = InputParser.getFieldName(this._inputs);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/// <reference path="../typings/index.d.ts" />
|
|
||||||
|
|
||||||
import { IOption } from "./IOption";
|
import { IOption } from "./IOption";
|
||||||
import { Model } from "./model";
|
import { Model } from "./model";
|
||||||
|
|
12
typings.json
12
typings.json
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"globalDependencies": {
|
|
||||||
"chai": "registry:dt/chai#3.4.0+20160601211834",
|
|
||||||
"jquery": "registry:dt/jquery#1.10.0+20160628074423",
|
|
||||||
"knockout": "registry:dt/knockout#0.0.0+20160512130947",
|
|
||||||
"mocha": "registry:dt/mocha#2.2.5+20160619032855",
|
|
||||||
"q": "registry:dt/q#0.0.0+20160613154756",
|
|
||||||
"require": "registry:dt/require#2.1.20+20160316155526",
|
|
||||||
"tfs": "npm:vss-web-extension-sdk/typings/tfs.d.ts",
|
|
||||||
"vss": "npm:vss-web-extension-sdk/typings/vss.d.ts"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -11,7 +11,7 @@ module.exports = {
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
filename: "scripts/[name].js",
|
filename: "scripts/[name].js",
|
||||||
publicPath: "https://localhost:9091/dist",
|
// publicPath: "https://localhost:9091/dist",
|
||||||
libraryTarget: "amd"
|
libraryTarget: "amd"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -70,7 +70,8 @@ module.exports = {
|
||||||
{ from: "./node_modules/vss-web-extension-sdk/lib/VSS.SDK.min.js", to: "./scripts/VSS.SDK.min.js" },
|
{ from: "./node_modules/vss-web-extension-sdk/lib/VSS.SDK.min.js", to: "./scripts/VSS.SDK.min.js" },
|
||||||
{ from: "**/*.css", to: "./css", context: "styles" },
|
{ from: "**/*.css", to: "./css", context: "styles" },
|
||||||
{ from: "*.html", to: "./", context: "." },
|
{ from: "*.html", to: "./", context: "." },
|
||||||
{ from: "**/*.png", to: "./img", context: "img" },
|
{ from: "**/*", to: "./img", context: "img" },
|
||||||
|
{ from: "**/*", to: "./images", context: "images" },
|
||||||
{ from: "./azure-devops-extension.json", to: "azure-devops-extension.json" },
|
{ from: "./azure-devops-extension.json", to: "azure-devops-extension.json" },
|
||||||
{ from: "./readme.md", to: "readme.md" }
|
{ from: "./readme.md", to: "readme.md" }
|
||||||
]
|
]
|
||||||
|
|
|
@ -46,7 +46,8 @@ module.exports = {
|
||||||
{ from: "./node_modules/vss-web-extension-sdk/lib/VSS.SDK.min.js", to: "./scripts/VSS.SDK.min.js" },
|
{ from: "./node_modules/vss-web-extension-sdk/lib/VSS.SDK.min.js", to: "./scripts/VSS.SDK.min.js" },
|
||||||
{ from: "**/*.css", to: "./css", context: "styles" },
|
{ from: "**/*.css", to: "./css", context: "styles" },
|
||||||
{ from: "*.html", to: "./", context: "." },
|
{ from: "*.html", to: "./", context: "." },
|
||||||
{ from: "**/*.png", to: "./img", context: "img" },
|
{ from: "**/*", to: "./img", context: "img" },
|
||||||
|
{ from: "**/*", to: "./images", context: "images" },
|
||||||
{ from: "./azure-devops-extension.json", to: "azure-devops-extension.json" },
|
{ from: "./azure-devops-extension.json", to: "azure-devops-extension.json" },
|
||||||
{ from: "./readme.md", to: "readme.md" }
|
{ from: "./readme.md", to: "readme.md" }
|
||||||
]
|
]
|
||||||
|
|
Загрузка…
Ссылка в новой задаче