https://github.com/cschleiden/vsts-extension-ts-seed-simple
Very simple seed project for developing a VSTS extension
https://github.com/cschleiden/vsts-extension-ts-seed-simple
seed vsts vsts-extension
Last synced: 6 months ago
JSON representation
Very simple seed project for developing a VSTS extension
- Host: GitHub
- URL: https://github.com/cschleiden/vsts-extension-ts-seed-simple
- Owner: cschleiden
- License: mit
- Created: 2016-02-22T01:53:43.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-07-10T12:28:44.000Z (over 7 years ago)
- Last Synced: 2025-03-30T14:51:10.451Z (7 months ago)
- Topics: seed, vsts, vsts-extension
- Language: JavaScript
- Size: 89.8 KB
- Stars: 67
- Watchers: 9
- Forks: 39
- Open Issues: 2
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## vsts-extension-ts-seed-simple ##
Very simple seed project for developing VSTS extensions using Typescript. Utilizes Typescript, grunt, and tsd. Detailed explanation how to get started can be found at https://cschleiden.wordpress.com/2016/02/24/extending-vsts-setup/.
** For new projects I'd recommend starting with one of my more modern extensions like https://github.com/cschleiden/vsts-quick-decompose **
### Structure ###
```
/scripts - Typescript code for extension
/img - Image assets for extension and description
/typings - Typescript typings
details.md - Description to be shown in marketplace
index.html - Main entry point
vss-extension.json - Extension manifest
```
### Version History ###
```
0.8.0 - Update dependencies
0.7.0 - Updated VSS SDK, moved from `typings` to `@types`
0.6.0 - Updated VSS SDK to M104
0.1.1 - Automatically increase extension's minor version when packaging.
```
### Usage ###
1. Clone the repository
1. `npm install` to install required local dependencies
2. `npm install -g grunt` to install a global copy of grunt (unless it's already installed)
2. `grunt` to build and package the application
#### Grunt ####
Three basic `grunt` tasks are defined:
* `build` - Compiles TS files in `scripts` folder
* `package-dev` - Builds the development version of the vsix package
* `package-release` - Builds the release version of the vsix package
* `publish-dev` - Publishes the development version of the extension to the marketplace using `tfx-cli`
* `publish-release` - Publishes the release version of the extension to the marketplace using `tfx-cli`
Note: To avoid `tfx` prompting for your token when publishing, login in beforehand using `tfx login` and the service uri of ` https://marketplace.visualstudio.com`.
#### Including framework modules ####
The VSTS framework is setup to initalize the requirejs AMD loader, so just use `import Foo = require("foo")` to include framework modules.
#### VS Code ####
The included `.vscode` config allows you to open and build the project using [VS Code](https://code.visualstudio.com/).
#### Unit Testing ####
The project is setup for unit testing using `mocha`, `chai`, and the `karma` test runner. A simple example unit test is included in `scripts/logic/messageHelper.tests.ts`. To run tests just execute:
```
grunt test
```