{"id":19665522,"url":"https://github.com/geeklearningio/gl-vsts-tasks-build-scripts","last_synced_at":"2025-04-28T22:31:12.937Z","repository":{"id":10157446,"uuid":"64678037","full_name":"geeklearningio/gl-vsts-tasks-build-scripts","owner":"geeklearningio","description":"This package provides NPM utility commands to ease Azure Pipelines Tasks extensions developement. This currently powers the development process behind Geek Learning's extensions.","archived":false,"fork":false,"pushed_at":"2022-04-13T20:05:20.000Z","size":266,"stargazers_count":3,"open_issues_count":10,"forks_count":2,"subscribers_count":4,"default_branch":"develop","last_synced_at":"2025-04-16T08:17:15.624Z","etag":null,"topics":["azure-devops","azure-devops-extension","azure-pipelines","vsts","vsts-tasks"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/publishers/geeklearningio","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/geeklearningio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-08-01T15:19:20.000Z","updated_at":"2020-10-05T11:23:42.000Z","dependencies_parsed_at":"2022-08-07T05:15:31.905Z","dependency_job_id":null,"html_url":"https://github.com/geeklearningio/gl-vsts-tasks-build-scripts","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geeklearningio%2Fgl-vsts-tasks-build-scripts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geeklearningio%2Fgl-vsts-tasks-build-scripts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geeklearningio%2Fgl-vsts-tasks-build-scripts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/geeklearningio%2Fgl-vsts-tasks-build-scripts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/geeklearningio","download_url":"https://codeload.github.com/geeklearningio/gl-vsts-tasks-build-scripts/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251397577,"owners_count":21583034,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["azure-devops","azure-devops-extension","azure-pipelines","vsts","vsts-tasks"],"created_at":"2024-11-11T16:23:11.580Z","updated_at":"2025-04-28T22:31:12.421Z","avatar_url":"https://github.com/geeklearningio.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gl-vsts-tasks-build\n\n[![Build status](https://geeklearning.visualstudio.com/gl-github/_apis/build/status/gl-vsts-tasks-build-scripts)](https://geeklearning.visualstudio.com/gl-github/_build/latest?definitionId=97)\n[![NPM@dev](https://img.shields.io/npm/v/gl-vsts-tasks-build-scripts/dev.svg)](https://www.npmjs.com/package/gl-vsts-tasks-build-scripts/v/dev)\n[![NPM@latest](https://img.shields.io/npm/v/gl-vsts-tasks-build-scripts/latest.svg?color=green)](https://www.npmjs.com/package/gl-vsts-tasks-build-scripts/v/latest)\n\nThis package provides NPM utility commands to ease **Azure Pipelines Tasks** extensions developement.\nThis currently powers the development process behind [Geek Learning's extensions](https://marketplace.visualstudio.com/publishers/geeklearningio).\n\n## Features\n\n* **Multiple packages generation** : This allows you to generate testing versions of the extension using unique ids, so you can easily\ntest your extension and setup staged deployment to the store. At Geek Learning our CI builds 3 versions of the extension \n(Dev, Preview, Production) and stores them as build artifacts. We then use Release Pipelines to publish them to the marketplace.\nDev package is always published automatically upon successfull build. Preview and Production are manually pushed if it passes our\nfinal review. Ids and packages settings, are defined in the `Configuration.json` file\n* **Manifest automation** : We automatically populate the contributions in the vss-extension in order to reduced manual maintainance\nof this file.\n* **Common shared code** : We provide an easy way to share powershell or node scripts accros your tasks without the need to make a \npackage of them. Place them in the right subfolder of `Common` and they will be automatically copied where appropriate on build.\n* **Node : Automic dependency installation** : Azure Pipelines Agent node execution engine requires npm dependencies to be bundled with your task\nWe automatically install two dependencies as a postbuild step after a successfull `npm install` at root.\n* **Automatic versionning** : Visual Studio Marketplace does not support semver, but we always rely on it when it comes to versionnning.\nAs a result we needed a way to encode our semver to a Major.Minor.Patch format. This feature can be switched of if you rely on another source of versionning.\n\n## Project structure\n\nAt the moment, if you wish to use this tooling, your project will need to comply with the architecture we designed.\n```\nRoot\n|-- package.json\n|-- Configuration.json\n|-- tsconfig.json                       // Optional if not using typescript\n|-- Common                              // Optional\n|   |-- Node                            // Node common scripts\n|   |   |-- *.ts                        \n|   |\n|   |-- Powershell3                     // Powershell3 common scripts\n|   |   |-- *.ps1\n|\n|-- Extension\n|   |-- vss-extension.json              // Extension Manifest\n|   |-- ...\n|\n|-- Tasks                               // Task Directory\n|   |-- NodeTask1\n|   |   |-- task.json                   // Task manifest\n|   |   |-- icon.png                    // Task icon\n|   |   |-- package.json                // Package.json, this is where this task dependencies must be listed \n|   |   |-- *.ts                        // Task source files\n|   |   |-- ...\n|   |\n|   |-- PowershellTask1\n|   |   |-- task.json\n|   |   |-- icon.png\n|   |   |-- *.ps1                       // Task powershell scripts\n|   |   |-- ...\n|   |\n|   | -- ...\n```\n\n## Root `Package.json`\n\nFirst you should install this package\n\n```bash\nnpm install gl-vsts-tasks-build-scripts --save-dev\n```\n\nThen to get the best of this tooling we recommand that you tweak your `package.json` file a little by adding a few `scripts` :\n```json\n{\n    \"scripts\": {\n        \"clean\": \"vsts-build-tools-clean\",\n        \"postinstall\": \"vsts-build-tools-install\",\n        \"prebuild\": \"vsts-build-tools-prebuild\",\n        \"build\": \"tsc\",\n        \"package\": \"vsts-build-tools-package\"\n    }\n}\n```\n\nYou can now restore or update dependencies and task bundled dependencies by running a single `npm install` at the root.\n\nYou can clean common files using `npm run clean`\n\nYou can build node tasks using `npm run build`\n\nYou can package your extension by running `npm run package`. Output will be placed in the `.BuildOutput` subdirectory at root.\n\n## Versioning\nYou can set version by packaging with `npm run package -- --version \u003cversion\u003e`.\n\nYou can disable the default behavior which would encode the semver metadata into the patch component with the additional flag `--noversiontransform`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeeklearningio%2Fgl-vsts-tasks-build-scripts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgeeklearningio%2Fgl-vsts-tasks-build-scripts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgeeklearningio%2Fgl-vsts-tasks-build-scripts/lists"}