From b3606fa834286529cc70cc4cf517e67a11afffe3 Mon Sep 17 00:00:00 2001 From: Nathan Paul Date: Sun, 20 Aug 2023 14:09:12 -0500 Subject: [PATCH 1/3] Enable the extension for the on-prem Server version --- azure-devops-extension.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-devops-extension.json b/azure-devops-extension.json index d8c157c..9276ed0 100644 --- a/azure-devops-extension.json +++ b/azure-devops-extension.json @@ -25,7 +25,7 @@ }, "targets": [ { - "id": "Microsoft.VisualStudio.Services.Cloud" + "id": "Microsoft.VisualStudio.Services" } ], "repository": { @@ -77,4 +77,4 @@ "addressable": true } ] -} \ No newline at end of file +} From e1e60df10aea05a7bee10ec0bfda14f6dfdf376a Mon Sep 17 00:00:00 2001 From: Nathan Paul Date: Sun, 20 Aug 2023 14:18:20 -0500 Subject: [PATCH 2/3] Remove services-only text from README --- README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/README.md b/README.md index 09d12fb..4edfd5e 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,6 @@ This extension can be found in the [Azure DevOps Marketplace](https://marketplace.visualstudio.com/items?itemName=ms-devlabs.cascading-picklists-extension 'Download Cascading Lists extension'). -Note that the extension is only supported on Azure DevOps Service. Is it is currently not supported on-prem yet due to a missing API. - ## Cascading Picklists This extension uses the `ms.vss-work-web.work-item-form` contribution point that enables you to build a cascading picklist on the work item form. Cascading picklists are made up of two seperate fields. The parent field and a child field. The parent picklist will contain a list of values, that when a value is selected, will display the values in the child list. From ef99281e3875b1d28c9f69dadb7b6b2bc4f9dbdc Mon Sep 17 00:00:00 2001 From: Nathan Paul Date: Sun, 20 Aug 2023 14:46:39 -0500 Subject: [PATCH 3/3] Fix docs and webpack (#1) * Change build:release to build-release and update documentation in README * Fix webpack not reloading on change * Fix indentation error and add more info about running locally. --- README.md | 39 ++++++++++++++++++++++----------------- package.json | 4 ++-- webpack.dev.config.js | 4 +++- 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 09d12fb..9fe64a8 100644 --- a/README.md +++ b/README.md @@ -53,36 +53,41 @@ Config example: 2. The values setup in the picklist and the values in the configuration must be an exact match. There is no validation to check or correct spelling mistakes in the values. -## Get started with Extensions +## Prerequisites -Building and testing the extension requires following. +1. [Download and install NodeJS](http://nodejs.org) -1. [Download and install NodeJS](http://nodejs.org 'NodeJS Website') -2. [Install tfx-cli](https://docs.microsoft.com/en-us/vsts/extend/publish/command-line?view=vsts) +2. [Install tfx-cli](https://docs.microsoft.com/en-us/vsts/extend/publish/command-line?view=vsts) + ``` + npm install --global tfx-cli + ``` -``` -npm i -g tfx-cli -``` +3. Install dev prerequisites + ``` + npm install + ``` -Install dev prerequisites +### Build the extension ``` -npm install +npm run build-release +npm run package-release ``` -### Create vsix to deploy on test environment - +### Run the extension server locally +First build and package the development version of the extension: ``` -npm run build +npm run build-dev +npm run package-dev ``` -### Run the extension server locally - -Execute following commands in two separate Command Prompts. Denote that in order to test extenstion locally, you need to have certificate and key in the project root called `private.crt` and `private.key`. +Then install the extension. +This only has to be done once. +After installing the extension, additional changes will be served by webpack. +Serve the extension locally: ``` -npm run watch -npm run serve-dev +npm run start ``` ### Publish the dev extension to marketplace diff --git a/package.json b/package.json index bcafcc1..0af837d 100644 --- a/package.json +++ b/package.json @@ -6,11 +6,11 @@ "description": "Extenstion that allows to customize cascading picklists for Azure DevOps.", "private": true, "scripts": { - "start": "webpack-dev-server --hot --progress --static ./ --port 44300 --https", + "start": "webpack-dev-server --hot --progress --static ./ --port 44300 --https --config webpack.dev.config.js", "build-dev": "webpack --progress --config webpack.dev.config.js", + "build-release": "webpack --progress", "package-dev": "tfx extension create --manifest-globs azure-devops-extension.json --overrides-file configs/dev.json", "package-release": "tfx extension create --manifest-globs azure-devops-extension.json --overrides-file configs/release.json", - "build:release": "webpack --progress", "postbuild": "npm run package", "package": "tfx extension create --manifest-globs azure-devops-extension.json", "gallery-publish": "tfx extension publish --rev-version", diff --git a/webpack.dev.config.js b/webpack.dev.config.js index b84b358..773f82d 100644 --- a/webpack.dev.config.js +++ b/webpack.dev.config.js @@ -11,6 +11,7 @@ const observerConfig = { output: { filename: 'observer.js', path: path.resolve(__dirname, 'dist'), + publicPath: '/dist/' }, devtool: 'source-map', @@ -33,7 +34,7 @@ const observerConfig = { new HtmlWebpackPlugin({ filename: 'observer.html', }), - ], + ] }; const confighubConfig = { @@ -42,6 +43,7 @@ const confighubConfig = { output: { filename: 'confighub.js', path: path.resolve(__dirname, 'dist'), + publicPath: '/dist/' }, devtool: 'source-map',