Permalink
Browse files

2.4.4 release. Merge from preview

  • Loading branch information...
wictorwilen committed Mar 6, 2018
2 parents 66dd08f + c331d69 commit 3c16c9d97afce10c782a92d67ee4049edc26cb66
Showing with 12,420 additions and 962 deletions.
  1. +2 −1 .npmignore
  2. +13 −0 .travis.yml
  3. +109 −1 CHANGELOG.md
  4. +37 −30 README.md
  5. BIN docs/assets/demo.gif
  6. +5 −1 generators/app/index.js
  7. +3 −0 generators/app/templates/.env
  8. +35 −11 generators/app/templates/README.md
  9. +10 −1 generators/app/templates/_gitignore
  10. +39 −33 generators/app/templates/gulpfile.js
  11. +23 −20 generators/app/templates/package.json
  12. +8 −4 src/app/templates/src/msteams-0.4.0.d.ts → generators/app/templates/src/MicrosoftTeams.d.ts
  13. +84 −0 generators/app/templates/src/app/scripts/TeamsBaseComponent.tsx
  14. +66 −6 generators/app/templates/src/app/server.ts
  15. BIN generators/app/templates/src/app/web/assets/icon.png
  16. BIN generators/app/templates/src/app/web/assets/tab-44.png
  17. BIN generators/app/templates/src/app/web/assets/tab-88.png
  18. +1 −0 generators/app/templates/src/app/web/index.html
  19. +1 −0 generators/app/templates/src/app/web/privacy.html
  20. +1 −0 generators/app/templates/src/app/web/tou.html
  21. BIN generators/app/templates/src/manifest/icon-color.png
  22. BIN generators/app/templates/src/manifest/icon-outline.png
  23. +23 −10 generators/app/templates/src/manifest/manifest.json
  24. +2 −2 generators/app/templates/tsconfig-client.json
  25. +1 −1 generators/app/templates/tsconfig.json
  26. +24 −25 generators/app/templates/webpack.config.js
  27. +5 −1 generators/bot/index.js
  28. +14 −10 generators/bot/templates/README-{botName}.md
  29. +0 −32 generators/bot/templates/src/app/scripts/{pinnedTabName}Tab.ts
  30. +92 −0 generators/bot/templates/src/app/scripts/{staticTabName}Tab.tsx
  31. +0 −29 generators/bot/templates/src/app/web/{pinnedTabName}Tab.html
  32. +25 −0 generators/bot/templates/src/app/web/{staticTabName}Tab.html
  33. +61 −3 generators/bot/templates/src/app/{botName}.ts
  34. +1 −0 generators/connector/index.js
  35. +28 −0 generators/connector/templates/README-{connectorName}.md
  36. +139 −0 generators/connector/templates/src/app/scripts/{connectorName}ConnectorConnect.tsx
  37. +25 −0 generators/connector/templates/src/app/web/{connectorName}Connector.html
  38. +30 −0 generators/connector/templates/src/app/web/{connectorName}ConnectorConnect.ejs
  39. +24 −0 generators/connector/templates/src/app/web/{connectorName}ConnectorConnected.html
  40. +94 −0 generators/connector/templates/src/app/{connectorName}Connector.ts
  41. +5 −1 generators/custombot/index.js
  42. +3 −3 generators/custombot/templates/README-{customBotName}.md
  43. +1 −1 generators/custombot/templates/src/app/{customBotName}.ts
  44. +1 −0 generators/messageExtension/index.js
  45. +104 −0 generators/messageExtension/templates/src/app/scripts/{messageExtensionName}Config.tsx
  46. +25 −0 generators/messageExtension/templates/src/app/web/{messageExtensionName}Config.html
  47. +5 −1 generators/tab/index.js
  48. +113 −0 generators/tab/templates/src/app/scripts/{tabName}Config.tsx
  49. +80 −0 generators/tab/templates/src/app/scripts/{tabName}Remove.tsx
  50. +102 −0 generators/tab/templates/src/app/scripts/{tabName}Tab.tsx
  51. +10 −19 generators/tab/templates/src/app/web/{tabName}Config.html
  52. +9 −7 generators/tab/templates/src/app/web/{tabName}Remove.html
  53. +4 −4 generators/tab/templates/src/app/web/{tabName}Tab.html
  54. +8,958 −258 package-lock.json
  55. +18 −16 package.json
  56. +0 −32 src/app/GeneratorTeamTabOptions.ts
  57. +77 −60 src/app/{GeneratorTeamsTab.ts → GeneratorTeamsApp.ts}
  58. +52 −0 src/app/GeneratorTeamsAppOptions.ts
  59. +16 −0 src/app/Yotilities.ts
  60. +6 −2 src/app/index.ts
  61. +3 −0 src/app/templates/.env
  62. +35 −11 src/app/templates/README.md
  63. +10 −1 src/app/templates/_gitignore
  64. +36 −34 src/app/templates/gulpfile.js
  65. +23 −20 src/app/templates/package.json
  66. +8 −4 generators/app/templates/src/msteams-0.4.0.d.ts → src/app/templates/src/MicrosoftTeams.d.ts
  67. +84 −0 src/app/templates/src/app/scripts/TeamsBaseComponent.tsx
  68. +66 −6 src/app/templates/src/app/server.ts
  69. BIN src/app/templates/src/app/web/assets/icon.png
  70. BIN src/app/templates/src/app/web/assets/tab-44.png
  71. BIN src/app/templates/src/app/web/assets/tab-88.png
  72. +1 −0 src/app/templates/src/app/web/index.html
  73. +1 −0 src/app/templates/src/app/web/privacy.html
  74. +1 −0 src/app/templates/src/app/web/tou.html
  75. BIN src/app/templates/src/manifest/icon-color.png
  76. BIN src/app/templates/src/manifest/icon-outline.png
  77. +23 −10 src/app/templates/src/manifest/manifest.json
  78. +2 −2 src/app/templates/tsconfig-client.json
  79. +1 −1 src/app/templates/tsconfig.json
  80. +24 −25 src/app/templates/webpack.config.js
  81. +58 −29 src/bot/BotGenerator.ts
  82. +4 −0 src/bot/index.ts
  83. +14 −10 src/bot/templates/README-{botName}.md
  84. +0 −32 src/bot/templates/src/app/scripts/{pinnedTabName}Tab.ts
  85. +92 −0 src/bot/templates/src/app/scripts/{staticTabName}Tab.tsx
  86. +0 −29 src/bot/templates/src/app/web/{pinnedTabName}Tab.html
  87. +25 −0 src/bot/templates/src/app/web/{staticTabName}Tab.html
  88. +61 −3 src/bot/templates/src/app/{botName}.ts
  89. +131 −0 src/connector/ConnectorGenerator.ts
  90. +7 −0 src/connector/index.ts
  91. +28 −0 src/connector/templates/README-{connectorName}.md
  92. +139 −0 src/connector/templates/src/app/scripts/{connectorName}ConnectorConnect.tsx
  93. +25 −0 src/connector/templates/src/app/web/{connectorName}Connector.html
  94. +30 −0 src/connector/templates/src/app/web/{connectorName}ConnectorConnect.ejs
  95. +24 −0 src/connector/templates/src/app/web/{connectorName}ConnectorConnected.html
  96. +94 −0 src/connector/templates/src/app/{connectorName}Connector.ts
  97. +9 −5 src/custombot/CustomBotGenerator.ts
  98. +4 −0 src/custombot/index.ts
  99. +3 −3 src/custombot/templates/README-{customBotName}.md
  100. +1 −1 src/custombot/templates/src/app/{customBotName}.ts
  101. +175 −0 src/messageExtension/MessageExtensionGenerator.ts
  102. +7 −0 src/messageExtension/index.ts
  103. +104 −0 src/messageExtension/templates/src/app/scripts/{messageExtensionName}Config.tsx
  104. +25 −0 src/messageExtension/templates/src/app/web/{messageExtensionName}Config.html
  105. +24 −20 src/tab/TabGenerator.ts
  106. +4 −0 src/tab/index.ts
  107. +113 −0 src/tab/templates/src/app/scripts/{tabName}Config.tsx
  108. +80 −0 src/tab/templates/src/app/scripts/{tabName}Remove.tsx
  109. +102 −0 src/tab/templates/src/app/scripts/{tabName}Tab.tsx
  110. +10 −19 src/tab/templates/src/app/web/{tabName}Config.html
  111. +9 −7 src/tab/templates/src/app/web/{tabName}Remove.html
  112. +4 −4 src/tab/templates/src/app/web/{tabName}Tab.html
  113. +2 −0 tsconfig.json
  114. +80 −61 webpack.config.js
View
@@ -9,4 +9,5 @@ src
.yo-rc.json
webpack.config.js
gulpfile.js
tsconfig.json
tsconfig.json
.travis.yml
View
@@ -0,0 +1,13 @@
branches:
only:
- master
- preview
sudo: false
language: node_js
cache:
directories:
- node_modules
node_js:
- 'stable'
- '6.9.1'
script: "npm run build"
View
@@ -5,6 +5,114 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [*2.4.2-preview*] - <*2018-03-04*>
* Fixed parameter not defined in static tab for bot
## [*2.4.1-preview*] - <*2018-03-03*>
### Changed
* Correct handling of messaging extensions settings
### Fixed
* Fixed an issue with missing dependencies when creating only a Messaging extension or Bot
## [*2.4.0-preview*] - <*2018-03-03*>
### Added
* Improved the Tab remove page with a "real" implementation and not just a dummy.
* Added support for messaging extension configuration
### Changed
* Renamed Compose Extensions to Message Extensions
* Moved to `msteams-ui-components` React library for UI
* Changed default bot til new bot
* Improved Connector flow with instructions to the user to close the tab
* Updated to schema v 1.2
* Updated npm packages
* Updated README files for GA'd Bot Service in Azure
* Renamed Custom Bot to Outgoing Webhooks
### Fixed
* Fixed a bug in Message Extensions
* Added default values for the Message extension name and description
* Fixed issue with Express 4.16.* and body parsing
## [*2.3.2-preview*] - <*2017-11-16*>
### Fixed
* PR #30, #31, #32
## [*2.3.1-preview*] - <*2017-11-05*>
### Added
* Added a sample Connector Configuration page.
* Improved Connector documentation
* Improved the Connector default sample (using O365 Connector card SDK and persistent connector storage)
### Changed
* Package file is now using name without spaces
### Fixed
* Fixed issues where space was used in solution name
* Added missing png for compose extension
### Removed
* Removed not used icon files
## [*2.3.0-preview*] - <*2017-11-04*>
## Added
* Added `--debug` flag to the `serve` gulp command
* Added support for `.env` file for local storage of environment properties
* Updated documentation files
### Changed
* Updated node packages
* Fixed issue #19
## [*2.2.1-preview*] - <*2017-08-06*>
### Changed
* Updated README.md
### Fixed
* Fixed schema issues
* Fixed issue [16]
## [*2.2.0-preview*] - <*2017-07-31*>
### Added
* Added `--skip-install` as a parameter to skip npm installation, and thus requires the user to run `npm install` manually.
* Added Travis CI
## [*2.1.0-preview*] - <*2017-07-25*>
### Added
* Added AppInsights logging to track usage of features. All data is anonymously collected.
## [*2.0.0-preview*] - <*2017-05-30*>
### Changed
* Adaptation to the new developer preview
## [*1.2.0] - <*2017-07-25*>
### Added
@@ -21,7 +129,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
* Adapt to changes to BotBuilder's IMessage interface in BotBuilder 3.8
### Fixes
### Fixed
* Bug fixes in msteams-app.css
View
@@ -1,27 +1,30 @@
# generator-teams
A [Yeoman Generator](http://yeoman.io/) for [Microsoft Teams](https://teams.microsoft.com) Apps created by [Wictor Wilén](http://twitter.com/wictor).
A [Yeoman Generator](http://yeoman.io/) for [Microsoft Teams](https://teams.microsoft.com) Apps.
Generates a Microsoft Teams App that can be used to add Tabs, Bots, and more to Microsoft Teams based on Node.js and TypeScript. Optionally it adds support for hosting using [Express](http://expressjs.com/).
For more information on how Tabs and Bots can be used with Teams see the [Teams Developer Documentation](https://msdn.microsoft.com/en-us/microsoft-teams/ )
This generator Generates a Microsoft Teams App that can be used to add Tabs, Bots, Connectors, Compose Extensions and more to Microsoft Teams based on Node.js and TypeScript.
[![npmjs](https://nodei.co/npm/generator-teams.png?downloads=true&downloadRank=true&stars=true)](https://www.npmjs.com/package/generator-teams)
> *Note:* The generator has been renamed from `generator-teams-tab` to `generator-teams`.
> **Note:** The generator has been renamed from `generator-teams-tab` to `generator-teams`.
> Old package will be marked as deprecated.
## How to
## yo teams Demo
![Demo](docs/assets/demo.gif)
### Install generator
## Install
All Yeoman generators should be installed as global modules. The generator is published to the npm registry and can be installed and downloaded using this command.
> **Important:** If this is the first time you're using Yeoman or installing a Yeoman generator, first install [Git](https://git-scm.com/download) and [Node.js](https://nodejs.org). For developers on Mac, we recommend using [Node Version Manager](https://github.com/creationix/nvm) to install Node.js with the right permissions. When the installation completes, restart your console (or if you are using Windows, restart your machine) to ensure you use the updated system environment variables.
Install `yo` (Yeoman) and `generator-teams` globally using NPM.
``` Shell
npm install generator-teams --global
npm install yo generator-teams --global
```
If you don't have Yeoman installed it has to be installed as well:
### Preview versions
Preview versions of the generator will be published with the **preview** tag and can be installed using the following command:
``` Shell
npm install yo --global
@@ -35,33 +38,31 @@ To install the preview version of the Teams generator, use the `preview` tag:
npm install generator-teams@preview --global
```
### Use the generator
To create a new project using the generator, execute the following command in the command prompt and answer the questions asked.
## Usage
``` Shell
yo teams
yo teams [arguments]
```
> *Note:* Files are created in the directory that you run the command from hence make sure you are happy with the location before you hit enter.
### Build the generator
### Arguments
In order to build the generator you need to install the Webpack as a global node module:
The following arguments can be used:
``` Shell
npm install webpack --global
```
* `--skip-install` - when used no packages will be installed at the end of the generator and you have to run `npm install` or similar manually.
You need to clone the repository or download a local copy and in the source folder install the node modules:
## The generated project
``` Shell
npm install
```
When the generator is done you can start working with your project. Make sure to read the generated README.md file for more instructions. Depending on how you generate your project additional readme files might be created with further instructions.
## Build the generator
The generator is built and packaged using Webpack.
If you are interested in contributing or modifying the generator itself, you clone this repository and then install all modules before building the solution.
``` Shell
webpack
npm install
npm run build
```
The bundled generator and the template files will end up in the `./generators/` folder.
@@ -80,12 +81,18 @@ To revert the link operation:
npm unlink
```
## Credits
## More information
For more information on how Tabs and Bots can be used with Teams see the [Teams Developer Documentation](https://msdn.microsoft.com/en-us/microsoft-teams/ )
## Contributors
* [Bill Bliss](https://github.com/billbliss) - Teams support and awesome pull requests and commits
* [Richard DiZerega](https://blogs.msdn.microsoft.com/richard_dizeregas_blog/2017/02/07/microsoft-teams-and-custom-tab-theme/) - Themes management idea
* [Elaine van Bergen](https://github.com/laneyvb) - pull requests
* [Daniel Laskewitz](https://github.com/Laskewitz) - pull requests
* [Wictor Wilén](https://github.com/wictorwilen) - Original author and coordinator
* [Bill Bliss](https://github.com/billbliss)
* [Richard DiZerega](https://github.com/richdizz)
* [Elaine van Bergen](https://github.com/laneyvb)
* [Daniel Laskewitz](https://github.com/Laskewitz)
* [Paul Schaeflein](https://github.com/pschaeflein)
## Contributing
View
Binary file not shown.
View
@@ -1,3 +1,4 @@
<<<<<<< HEAD
module.exports =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
@@ -424,4 +425,7 @@ module.exports = __webpack_require__(7);
/***/ })
/******/ ]);
/******/ ]);
=======
module.exports=function(t){var e={};function o(s){if(e[s])return e[s].exports;var i=e[s]={i:s,l:!1,exports:{}};return t[s].call(i.exports,i,i.exports,o),i.l=!0,i.exports}return o.m=t,o.c=e,o.d=function(t,e,s){o.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:s})},o.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},o.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o.w={},o(o.s=27)}([function(t,e){t.exports=require("path")},function(t,e){t.exports=require("guid")},function(t,e){t.exports=require("yosay")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});let s=o(0);const i="package.json";e.Yotilities=class{static validateUrl(t){return/(https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(t)}static fixFileNames(t,e){if(void 0!==t){var o=s.basename(t);if("_"===o[0]){t="."+o.substr(1);var i=s.dirname(t);t=s.join(i,t)}for(var n in e)e.hasOwnProperty(n)&&"string"==typeof e[n]&&(t=t.replace(new RegExp("{"+n+"}","g"),e[n]))}return t}static addAdditionalDeps(t,e){var o=e.readJSON(i);t.forEach(t=>{o.dependencies[t[0]]=t[1]}),e.writeJSON(i,o)}}},function(t,e){t.exports=require("lodash")},function(t,e){t.exports=require("yeoman-generator")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});e.GeneratorTeamsAppOptions=class{constructor(){this.botid="",this.botType="",this.connectorType="",this.messageExtensionType=""}}},,,,,,,,,,,,,,,,function(t){t.exports={name:"generator-teams",version:"2.4.4-preview",description:"Yeoman generator for Microsoft Teams Apps",main:"generators/app/index.js",scripts:{build:"node_modules/.bin/webpack"},files:["generators"],repository:{type:"git",url:"https://github.com/OfficeDev/generator-teams.git"},bugs:{url:"https://github.com/OfficeDev/generator-teams/issues"},homepage:"https://github.com/OfficeDev/generator-teams",keywords:["yeoman-generator","Microsoft Teams","microsoft-teams","Office 365","office-365","bot","bot-framework","botbuilder","chatbot"],author:"Wictor Wilén (wictor@wictorwilen.se)",maintainers:[{name:"Wictor Wilén",email:"wictor@wictorwilen.se",url:"http://www.wictorwilen.se"}],license:"MIT",devDependencies:{"@types/lodash":"^4.14.104","@types/yeoman-generator":"^2.0.1","@types/yosay":"0.0.29","clean-webpack-plugin":"^0.1.18","copy-webpack-plugin":"^4.5.0","ts-loader":"^4.0.1",typescript:"^2.6.1",webpack:"^4.0.1","webpack-cli":"^2.0.10"},dependencies:{applicationinsights:"^1.0.2",chalk:"^2.3.2",guid:"0.0.12",lodash:"^4.17.5","yeoman-generator":"^2.0.3",yosay:"^2.0.1"}}},function(t,e){t.exports=require("applicationinsights")},function(t,e){t.exports=require("chalk")},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const s=o(5),i=o(4),n=o(24),a=o(6),r=o(3),p=o(23);let c=o(2),l=(o(0),o(22)),u=o(1);e.GeneratorTeamsApp=class extends s{constructor(t,e){super(t,e),this.options=new a.GeneratorTeamsAppOptions,e.force=!0,this.desc("Generate a Microsoft Teams application."),this.argument("solutionName",{description:"Solution name, as well as folder name",required:!1}),this.option("skip-install",{type:Boolean,default:!1,description:"Skips running npm install"}),p.setup("6d773b93-ff70-45c5-907c-8edae9bf90eb"),p.Configuration.setAutoCollectExceptions(!0),p.Configuration.setAutoCollectPerformance(!0),p.defaultClient.commonProperties={version:l.version},p.defaultClient.trackEvent({name:"start-generator"})}initializing(){this.log(c("Welcome to the "+n.default.yellow(`Microsoft Teams App generator (${l.version})`))),this.composeWith("teams:tab",{options:this.options}),this.composeWith("teams:bot",{options:this.options}),this.composeWith("teams:custombot",{options:this.options}),this.composeWith("teams:connector",{options:this.options}),this.composeWith("teams:messageExtension",{options:this.options})}prompting(){return this.prompt([{type:"input",name:"solutionName",default:i.kebabCase(this.appname),when:()=>!this.options.solutionName,message:"What is your solution name?"},{type:"list",name:"whichFolder",default:"current",when:()=>!this.options.solutionName,message:"Where do you want to place the files?",choices:[{name:"Use the current folder",value:"current"},{name:"Create a subfolder with solution name",value:"subdir"}]},{type:"input",name:"name",message:"Title of your Microsoft Teams App project?",default:this.appname},{type:"input",name:"developer",message:"Your (company) name? (max 32 characters)",default:this.user.git.name,validate:t=>t.length>0&&t.length<=32},{type:"checkbox",message:"What do you want to add to your project?",name:"parts",choices:[{name:"A Tab",value:"tab",checked:!0},{name:"A Bot",value:"bot"},{name:"An Outgoing Webhook",value:"custombot"},{name:"A Connector",value:"connector"},{name:"A Message Extension",value:"messageextension"}]},{type:"input",name:"host",message:"The URL where you will host this solution?",default:t=>`https://${i.camelCase(t.solutionName)}.azurewebsites.net`,validate:r.Yotilities.validateUrl}]).then(t=>{t.host=t.host.endsWith("/")?t.host.substr(0,t.host.length-1):t.host,this.options.title=t.name,this.options.description=this.description,this.options.solutionName=this.options.solutionName||t.solutionName,this.options.shouldUseSubDir="subdir"===t.whichFolder,this.options.libraryName=i.camelCase(this.options.solutionName),this.options.packageName=this.options.libraryName.toLocaleLowerCase(),this.options.developer=t.developer,this.options.host=t.host;var e=this.options.host.substring(this.options.host.indexOf("://")+3).split(".");this.options.namespace=i.reverse(e).join("."),this.options.tou=t.host+"/tou.html",this.options.privacy=t.host+"/privacy.html",this.options.bot=-1!=t.parts.indexOf("bot"),this.options.tab=-1!=t.parts.indexOf("tab"),this.options.connector=-1!=t.parts.indexOf("connector"),this.options.customBot=-1!=t.parts.indexOf("custombot"),this.options.messageExtension=-1!=t.parts.indexOf("messageextension"),this.options.id=u.raw(),this.options.shouldUseSubDir&&this.destinationRoot(this.destinationPath(this.options.solutionName))})}configuring(){}default(){}writing(){this.sourceRoot(),["README.md","gulpfile.js","package.json",".env","src/app/server.ts","src/manifest/manifest.json","webpack.config.js","src/app/scripts/client.ts","src/app/web/index.html","src/app/web/tou.html","src/app/web/privacy.html"].forEach(t=>{this.fs.copyTpl(this.templatePath(t),r.Yotilities.fixFileNames(t,this.options),this.options)}),["_gitignore","tsconfig.json","tsconfig-client.json","src/manifest/icon-outline.png","src/manifest/icon-color.png","src/app/web/assets/icon.png","src/app/scripts/TeamsBaseComponent.tsx","src/MicrosoftTeams.d.ts","deploy.cmd","_deployment"].forEach(t=>{this.fs.copy(this.templatePath(t),r.Yotilities.fixFileNames(t,this.options))})}conflicts(){}install(){this.options["skip-install"]?this.log(n.default.yellow('Skipping installation of dependencies. You should run "npm install"')):this.npmInstall()}end(){this.log(n.default.yellow("Thanks for using the generator!")),this.log(n.default.yellow("Have fun and make great Microsoft Teams Apps...")),p.defaultClient.trackEvent({name:"end-generator"}),this.options.bot&&(p.defaultClient.trackEvent({name:"bot"}),"existing"==this.options.botType?p.defaultClient.trackEvent({name:"bot-existing"}):p.defaultClient.trackEvent({name:"bot-new"})),this.options.messageExtension&&p.defaultClient.trackEvent({name:"messageExtension"}),this.options.connector&&p.defaultClient.trackEvent({name:"connector"}),this.options.customBot&&p.defaultClient.trackEvent({name:"outgoingWebhook"}),this.options.staticTab&&p.defaultClient.trackEvent({name:"staticTab"}),this.options.tab&&p.defaultClient.trackEvent({name:"tab"}),p.defaultClient.flush()}}},function(t,e,o){"use strict";Object.defineProperty(e,"__esModule",{value:!0});const s=o(25);t.exports=s.GeneratorTeamsApp},function(t,e,o){t.exports=o(26)}]);
>>>>>>> preview
@@ -0,0 +1,3 @@
MICROSOFT_APP_ID=<%= botid ? botid : '' %>
MICROSOFT_APP_PASSWORD=
PORT=3007
@@ -8,28 +8,54 @@ TODO: Add your documentation here
Head on over to [official documentation](https://msdn.microsoft.com/en-us/microsoft-teams/tabs) to learn how to build Microsoft Teams Tabs.
## Building the tab
## Building the app
```
``` bash
npm i -g gulp
gulp build
```
## Building the manifest
```
``` bash
gulp manifest
```
## Debug and test locally
To debug and test the solution locally you use the `serve` Gulp task. This will first build the app and then start a local web server on port 3007, where you can test your Tabs, Bots or other extensions. Also this command will rebuild the App if you change any file in the `/src` directory.
``` bash
gulp serve
```
To debug the code you can append the argument `debug` to the `serve` command as follows. This allows you to step through your code using your preferred code editor.
``` bash
gulp serve --debug
```
To step through code in Visual Studio Code you need to add the following snippet in the `./.vscode/launch.json` file. Once done, you can easily attach to the node process after running the `gulp server --debug` command.
``` json
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 5858,
"sourceMaps": true,
"outFiles": [
"${workspaceRoot}/dist/**/*.js"
],
"remoteRoot": "${workspaceRoot}/src/"
},
```
## Output
* dist/* - the files required to host the solution
* package/* - the Teams extensibility package (zip file) to be uploaded to Microsoft Teams ([how-to](https://msdn.microsoft.com/en-us/microsoft-teams/createpackage#uploading-your-tab-package-to-microsoft-teams))
## Express hosting
If you choose to use [Express](http://expressjs.com/) hosting when you create your Tab project, a file called `./src/server.ts` will be created. Node is automatically configured to start this Express server when deployed to Azure.
## Deploying to Azure using Git
If you want to deploy to Azure using Git follow these steps.
@@ -45,10 +71,8 @@ This will automatically deploy your files to Azure, download the npm pacakges, b
7. In your tab folder initialize a Git repository using `git init`
8. Build the solution using `gulp build` to make sure you don't have any errors
9. Commit all your files using `git add -A && git commit -m "Initial commit"`
10. Run the following command to set up the remote repository: `git remote add azure https://<username>@<%=solutionName%>.scm.azurewebsites.net:443/<%=solutionName%>.git`. You need to replace <username> with the name of the user you set up in _Deployment Credentials_. You can also copy the URL from *Options* in the Azure Web App.
10. Run the following command to set up the remote repository: `git remote add azure https://<username>@<%=libraryName%>.scm.azurewebsites.net:443/<%=libraryName%>.git`. You need to replace <username> with the name of the user you set up in _Deployment Credentials_. You can also copy the URL from *Options* in the Azure Web App.
11. To push your code use to Azure use the following command: `git push azure master`, you will be asked for your credentials the first time
12. Wait until the deployment is completed and navigate to <%= host %>/privacy.html to test that the web application is running
13. Done
14. Repeat step 11 for every commit you do and want to deploy
14. Repeat step 11 for every commit you do and want to deploy
Oops, something went wrong.

0 comments on commit 3c16c9d

Please sign in to comment.