Coder Social home page Coder Social logo

microsoft / azure-devops-extension-hot-reload-and-debug Goto Github PK

View Code? Open in Web Editor NEW
87.0 9.0 25.0 1.6 MB

Azure DevOps extension sample that uses hot reloading and is debuggable directly in VS Code

License: MIT License

JavaScript 29.41% HTML 3.70% TypeScript 64.30% SCSS 2.59%

azure-devops-extension-hot-reload-and-debug's People

Contributors

dependabot[bot] avatar dertosh avatar dwhathaway avatar ethanis avatar maciekwin3 avatar matissehack avatar microsoft-github-policy-service[bot] avatar microsoftopensource avatar msftgits avatar nathan-teoh avatar pabrams avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

azure-devops-extension-hot-reload-and-debug's Issues

Problem with new Extension

Hi!
I try to create new extension base on this repo.
My problem is during 'npm install'.
I have a problem with sass.
When I change version on: 7.0.1 I have another problems.
Has anybody tried to create azure-devops-extension (in the last few months) based on this repo?

yo @microsoft/azure-devops-extension fails

When I run yo @microsoft/azure-devops-extension it fails with the following error:

AssertionError [ERR_ASSERTION]: Trying to copy from a source that does not exist: C:\Users\johndoe\AppData\Roaming\npm\node_modules\@microsoft\generator-azure-devops-extension\app\templates\.gitignore

After creating manually a .gitignore file in the C:\Users\johndoe\AppData\Roaming\npm\node_modules@microsoft\generator-azure-devops-extension\app\templates folder I could create the scaffolding for the Extension.

Stefan [msft]

Where is the default contribution visible?

The default contribution has a target of ms.vss-web.project-hub-groups-collection and type ms.vss-web.hub-group.

I'm trying to figure out where this contribution is actually made.

In old UI, it looks like it should show up here:
image

But in the new UI, I don't see an equivalent hub:
image

Looking at the extensibility points, I don't see the type or target listed there. Since the UI has changed, has this hub group been removed? Should this template be using a different hub as an example? Or am I missing something?

Icons not showing in released extension

I have noticed that after I released my extension, the icons are not appearing as demonstrated in the attached image. However, when I am debugging the application, everything appears to be functioning correctly.

image

Icons not showing

Hi there,

After downloading this project and testing it in an environment of mine, I noticed that the icons are not loading properly. Does anyone have a tip?

The error code in the console:

  1. Failed to decode downloaded font: https://{name}.gallery.vsassets.io/dist/acb0b44d710a15f95219.woff

  2. OTS parsing error: invalid sfntVersion: 218762506

Fonts and icons not loading after upgrading dependencies to latest versions

Fonts not loading after upgrading package versions:

image

package.json (updated dependencies

"dependencies": {
    "azure-devops-extension-api": "^1.158.0",
    "azure-devops-extension-sdk": "^2.0.11",
    "azure-devops-ui": "^2.167.46"
  },
  "devDependencies": {
    "@types/react": "~16.8.2",
    "@types/react-dom": "~16.8.0",
    "@typescript-eslint/eslint-plugin": "^5.18.0",
    "@typescript-eslint/parser": "^5.18.0",
    "base64-inline-loader": "^2.0.1",
    "copy-webpack-plugin": "^11.0.0",
    "css-loader": "^6.7.1",
    "eslint": "^8.12.0",
    "eslint-config-prettier": "^8.5.0",
    "eslint-plugin-prettier": "^4.0.0",
    "file-loader": "^6.2.0",
    "node-sass": "^7.0.3",
    "prettier": "^2.6.2",
    "react": "~16.13.1",
    "react-dom": "~16.13.1",
    "rimraf": "^3.0.2",
    "sass-loader": "^13.0.2",
    "style-loader": "^3.3.1",
    "tfx-cli": "^0.12.0",
    "ts-loader": "^9.2.8",
    "typescript": "^4.6.3",
    "webpack": "^5.74.0",
    "webpack-cli": "^4.10.0",
    "webpack-dev-server": "^3.11.2"
  }

webpack.config.json (only updated the breaking changes to CopyWebpackPlugin)

const path = require("path");
const fs = require("fs");
const CopyWebpackPlugin = require("copy-webpack-plugin");

const entries = {};
const srcDir = path.join(__dirname, "src");
fs.readdirSync(srcDir)
  .filter(dir => fs.statSync(path.join(srcDir, dir)).isDirectory())
  .forEach(dir => (entries[dir] = "./" + path.join("src", dir, dir)));

module.exports = {
  target: "web",
  entry: entries,
  output: {
    filename: "[name]/[name].js",
    publicPath: "/dist/",
  },
  devtool: "inline-source-map",
  devServer: {
    https: true,
    port: 3000,
  },
  resolve: {
    extensions: [".ts", ".tsx", ".js"],
    alias: {
      "azure-devops-extension-sdk": path.resolve(
        "node_modules/azure-devops-extension-sdk"
      )
    }
  },
  stats: {
    warnings: false
  },
  module: {
    rules: [
      {
        test: /\.tsx?$/,
        use: "ts-loader"
      },
      {
        test: /\.scss$/,
        use: [
          "style-loader",
          "css-loader",
          "azure-devops-ui/buildScripts/css-variables-loader",
          "sass-loader"
        ]
      },
      {
        test: /\.css$/,
        use: ["style-loader", "css-loader"]
      },
      {
        test: /\.woff$/,
        use: [
          {
            loader: "base64-inline-loader"
          }
        ]
      },
      {
        test: /\.html$/,
        use: "file-loader"
      }
    ]
  },
  plugins: [
    new CopyWebpackPlugin({
      //[{ from: "**/*.html", context: "src" }])
      patterns: [
        {
          from: "**/*.html",
          context: "src",
        }
      ]
    }),
  ]
};

CopyWebpackPlugin error after package version updates

After updating package versions, the CopyWebpackPlugin fails.

Updating from the suggested:

plugins: [new CopyWebpackPlugin([{ from: "**/*.html", context: "src" }])]

To:

plugins: [new CopyWebpackPlugin({ patterns: [{ from: "**/*.html", context: "src" }] })]

seems to have fixed the problem.

Unverified Breakpoint message while trying to debug tsx file.

I am new to this, and have followed the steps. The debugging session starts fine, but if I try to add break points in my tsx file, it shows "Unverified Breakpoint" and the breakpoints are not hit.

image

The .vscode folder and launch.json are at the root, and I have a src folder inside it which had the code files.
Folder structure:
image

webpack.config.js:
image

launch.json is exactly as mentioned:
{ "version": "0.2.0", "configurations": [ { "name": "Launch Firefox", "type": "firefox", "request": "launch", "url": "https://localhost:3000/", "reAttach": true, "pathMappings": [ { "url": "webpack:///", "path": "${workspaceFolder}/" } ] } ] }

Any hep will be appreciated.

Yeoman instructions need updating

I tried going down the route of using yo for scaffolding the project, and it uses an old template with 2 yo dependencies in package.json.
Here is a glimpse of npm outdated

Package Current Wanted Latest Location
@types/react 16.14.38 16.14.38 18.0.33 node_modules/@types/react
@types/react-dom 16.9.18 16.9.18 18.0.11 node_modules/@types/react-dom
@typescript-eslint/eslint-plugin 1.13.0 1.13.0 5.57.1 node_modules/@typescript-eslint/eslint-plugin
@typescript-eslint/parser 1.13.0 1.13.0 5.57.1 node_modules/@typescript-eslint/parser
azure-devops-ui 1.160.4 1.160.4 2.167.63 node_modules/azure-devops-ui
base64-inline-loader 1.1.1 1.1.1 2.0.1 node_modules/base64-inline-loader
copy-webpack-plugin 5.1.2 5.1.2 11.0.0 node_modules/copy-webpack-plugin
css-loader 2.1.1 2.1.1 6.7.3 node_modules/css-loader
eslint 5.16.0 5.16.0 8.37.0 node_modules/eslint
eslint-config-prettier 4.3.0 4.3.0 8.8.0 node_modules/eslint-config-prettier
eslint-plugin-prettier 3.4.1 3.4.1 4.2.1 node_modules/eslint-plugin-prettier
file-loader 3.0.1 3.0.1 6.2.0 node_modules/file-loader
prettier 1.19.1 1.19.1 2.8.7 node_modules/prettier
react 16.14.0 16.14.0 18.2.0 node_modules/react
react-dom 16.14.0 16.14.0 18.2.0 node_modules/react-dom
rimraf 2.7.1 2.7.1 4.4.1 node_modules/rimraf
style-loader 0.23.1 0.23.1 3.3.2 node_modules/style-loader
tfx-cli 0.7.11 0.7.11 0.14.0 node_modules/tfx-cli
ts-loader 6.2.2 6.2.2 9.4.2 node_modules/ts-loader
typescript 3.9.10 3.9.10 5.0.3 node_modules/typescript

.woff 404 Not Found in Production

When deploying my extension to production, icons from the azure-devops-ui library are not displaying. This issue does not occur in my development environment. In the browser console, I'm greeted with a 404 error pointing to:

https://[user].gallerycdn.vsassets.io/dist/[fileName].woff

However, accessing the resource directly via:

https://[user].gallerycdn.vsassets.io/extensions/[user]/[extensionName]/[Version]/[SomeNumber]/dist/[fileNmae].woff

shows that the file does indeed exist.

I'm using:
azure-devops-ui version: 2.167.75
Webpack version: 5.88.1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.