Skip to content

Commit

Permalink
2.7.0-preview4
Browse files Browse the repository at this point in the history
  • Loading branch information
wictorwilen committed Apr 15, 2019
1 parent 22ab47a commit da75026
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 13 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
* Reorganized the file structure and file namings
* Improved auto generated class names formatting
* Updated all npm references
* Updated instructions for Git deployment to Azure (in README file)

### Added

Expand All @@ -27,6 +28,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
* Support for dynamics properties/variables in the manifest.json file
* Added TSLinting to the build pipeline
* Added support for testing using Jest and Enzyme. Use `npm run test` and `npm run coverage`
* Support for validating multiple schemas based on the manifest version (1.3 and devPreview supported)

### Fixes

Expand Down
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,19 @@ extensions:
---
# generator-teams

[![npm version](https://badge.fury.io/js/generator-teams.svg)](https://badge.fury.io/js/generator-teams) ![npm](https://img.shields.io/npm/dt/generator-teams.svg) ![NPM](https://img.shields.io/npm/l/generator-teams.svg) ![GitHub issues](https://img.shields.io/github/issues/officedev/generator-teams.svg) ![GitHub closed issues](https://img.shields.io/github/issues-closed/officedev/generator-teams.svg) ![GitHub stars](https://img.shields.io/github/stars/officedev/generator-teams.svg)
[![npm version](https://badge.fury.io/js/generator-teams.svg)](https://www.npmjs.com/package/generator-teams)
[![npm](https://img.shields.io/npm/dt/generator-teams.svg)]((https://www.npmjs.com/package/generator-teams))
[![MIT](https://img.shields.io/npm/l/generator-teams.svg)](https://github.com/OfficeDev/generator-teams/blob/master/LICENSE.md)
[![GitHub issues](https://img.shields.io/github/issues/officedev/generator-teams.svg)](https://github.com/OfficeDev/generator-teams/issues)
[![GitHub closed issues](https://img.shields.io/github/issues-closed/officedev/generator-teams.svg)](https://github.com/OfficeDev/generator-teams/issues?q=is%3Aissue+is%3Aclosed)
[![GitHub stars](https://img.shields.io/github/stars/officedev/generator-teams.svg)](https://github.com/OfficeDev/generator-teams/stargazers)

A [Yeoman Generator](http://yeoman.io/) for [Microsoft Teams](https://teams.microsoft.com) Apps.

| @master | @preview |
:--------:|:---------:
![npm (latest)](https://img.shields.io/npm/v/generator-teams/latest.svg)|![npm (preview)](https://img.shields.io/npm/v/generator-teams/preview.svg)
![Travis (.org) branch](https://img.shields.io/travis/OfficeDev/generator-teams/master.svg)|![Travis (.org) branch](https://img.shields.io/travis/OfficeDev/generator-teams/preview.svg)
[![npm (latest)](https://img.shields.io/npm/v/generator-teams/latest.svg)](https://www.npmjs.com/package/generator-teams)|[![npm (preview)](https://img.shields.io/npm/v/generator-teams/preview.svg)](https://www.npmjs.com/package/generator-teams)
[![Travis (.org) branch](https://img.shields.io/travis/OfficeDev/generator-teams/master.svg)](https://travis-ci.org/OfficeDev/generator-teams)|[![Travis (.org) branch](https://img.shields.io/travis/OfficeDev/generator-teams/preview.svg)](https://travis-ci.org/OfficeDev/generator-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.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generator-teams",
"version": "2.7.0-preview3",
"version": "2.7.0-preview4",
"description": "Yeoman generator for Microsoft Teams Apps",
"main": "generators/app/index.js",
"scripts": {
Expand Down
10 changes: 5 additions & 5 deletions src/app/templates/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,14 @@ This will automatically deploy your files to Azure, download the npm pacakges, b
2. Create a new *Resource Group* or use an existing one
3. Create a new *Web App* with Windows App Service Plan and give it the name of your tab, the same you used when asked for URL in the Yeoman generator. In your case <%= host %>.
4. Add the following keys in the Application Settings: Key -> "WEBSITE_NODE_DEFAULT_VERSION" Value -> "8.10.0" and Key -> "SCM_COMMAND_IDLE_TIMEOUT" Value -> "1800"
5. Go to the created Web App and configure *Deployment Credentials*. Not that this is only done once per Microsoft Azure Account.
6. Go to *Deployment Options*
7. Choose *Local Git Repository* as source and click *OK*
5. Go to *Deployment Center*
6. Choose *Local Git Repository* as source and *App Service build service* as the Build Provider
7. Click on *Deployment Credentials* and store the App Credentials securely
8. In your tab folder initialize a Git repository using `git init`
9. Build the solution using `gulp build` to make sure you don't have any errors
10. Commit all your files using `git add -A && git commit -m "Initial commit"`
11. Run the following command to set up the remote repository: `git remote add azure https://<username>@<%=websitePrefix%>.scm.azurewebsites.net:443/<%=websitePrefix%>.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.
12. 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
11. Run the following command to set up the remote repository: `git remote add azure https://<username>@<%=websitePrefix%>.scm.azurewebsites.net:443/<%=websitePrefix%>.git`. You need to replace <username> with the username of the App Credentials you retrieved in _Deployment Credentials_. You can also copy the URL from *Options* in the Azure Web App.
12. 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, insert the Password for the ApP Credential
13. Wait until the deployment is completed and navigate to <%= host %>/privacy.html to test that the web application is running
14. Done
15. Repeat step 11 for every commit you do and want to deploy
Expand Down
29 changes: 25 additions & 4 deletions src/app/templates/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,19 @@ var watcherfiles = ["./src/**/*.*"]
var manifestFiles = ["./src/manifest/**/*.*", '!**/*.json']
var temp = ["./temp"]



/**
* Supported schemas
*/
const SCHEMAS = [
{
version: "1.3",
schema: "https://developer.microsoft.com/en-us/json-schemas/teams/v1.3/MicrosoftTeams.schema.json"
},
{
version: "devPreview",
schema: "https://raw.githubusercontent.com/OfficeDev/microsoft-teams-app-schema/preview/DevPreview/MicrosoftTeams.schema.json"
}
];

/**
* Watches source files and invokes the build task
Expand Down Expand Up @@ -117,9 +128,19 @@ gulp.task('schema-validation', (callback) => {
encoding: 'utf-8'
}, function (err, data) {
if (!err) {
var requiredUrl = "https://developer.microsoft.com/en-us/json-schemas/teams/v1.3/MicrosoftTeams.schema.json";
var validator = new ZSchema();
var json = JSON.parse(data);
log('Using manifest schema ' + json.manifestVersion);
let definition = SCHEMAS.find(s => s.version == json.manifestVersion);
if (definition == undefined) {
callback(new PluginError("validate-manifest", "Unable to locate schema"));
return;
}
if (json["$schema"] != definition.schema) {
log("Note: the defined schema in your manifest does not correspond to the manifestVersion");
}
var requiredUrl = definition.schema;
var validator = new ZSchema();

var schema = {
"$ref": requiredUrl
};
Expand Down

0 comments on commit da75026

Please sign in to comment.