Permalink
Browse files

Documentation and property updates

  • Loading branch information...
wictorwilen committed Mar 7, 2017
1 parent 53e8fe0 commit 8ad396d6d1e7894880f1c72a0d361b1a3682d44a
Showing with 44 additions and 25 deletions.
  1. +1 −0 .gitignore
  2. +2 −0 README.md
  3. +20 −18 generators/app/index.js
  4. +1 −1 generators/app/index.js.map
  5. +2 −2 generators/app/templates/README.md
  6. +18 −4 package.json
View
@@ -1 +1,2 @@
.vscode
node_modules
View
@@ -4,6 +4,8 @@ A [Yeoman Generator](http://yeoman.io/) for [Microsoft Teams](https://teams.micr
Generates a Microsoft Teams tab project based on Node.js and TypeScript. Optionally add support for hosting using [Express](http://expressjs.com/).
[![npmjs](https://nodei.co/npm/generator-teams-tab.png?downloads=true&downloadRank=true&stars=true)]((https://www.npmjs.com/package/generator-teams-tab))
## How to
### Install generator
View
@@ -85,22 +85,22 @@ module.exports = GeneratorTeamsTab_1.GeneratorTeamsTab;
const Generator = __webpack_require__(5);
const lodash = __webpack_require__(3);
const chalk = __webpack_require__(2);
let yosay = __webpack_require__(6);
let path = __webpack_require__(4);
const chalk = __webpack_require__(2);
class GeneratorTeamsTab extends Generator {
constructor(args, opts) {
super(args, opts);
opts.force = true;
this.desc('Generate a Microsoft Teams Tab solution.');
this.argument('solutionName', { description: 'Solution name, as well as folder name', required: false });
this.argument('solutionName', {
description: 'Solution name, as well as folder name',
required: false
});
}
initializing() {
this.log(yosay('Welcome to the ' + chalk.yellow('Microsoft Teams Tab generator')));
}
validateUrl(url) {
return /(https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(url);
}
prompting() {
return this.prompt([
{
@@ -210,7 +210,6 @@ class GeneratorTeamsTab extends Generator {
if (this.shouldUseSubDir) {
this.destinationRoot(this.destinationPath(this.solutionName));
}
//this.config.set({ libraryName });
});
}
configuring() {
@@ -268,17 +267,6 @@ class GeneratorTeamsTab extends Generator {
this.fs.copy(this.templatePath(t), this.fixFileNames(t));
});
}
fixFileNames(filename) {
if (filename !== undefined) {
var basename = path.basename(filename);
if (basename[0] === '_') {
var filename = '.' + basename.substr(1);
var dirname = path.dirname(filename);
filename = path.join(dirname, filename);
}
}
return filename;
}
conflicts() {
}
install() {
@@ -299,9 +287,23 @@ class GeneratorTeamsTab extends Generator {
}
end() {
this.log(chalk.yellow('Thanks for using the generator'));
this.log(chalk.yellow('/\tWictor Wilén, @wictor'));
this.log(chalk.yellow('Wictor Wilén, @wictor'));
this.log(chalk.yellow('Have fun and make great Tabs...'));
}
validateUrl(url) {
return /(https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/.test(url);
}
fixFileNames(filename) {
if (filename !== undefined) {
var basename = path.basename(filename);
if (basename[0] === '_') {
var filename = '.' + basename.substr(1);
var dirname = path.dirname(filename);
filename = path.join(dirname, filename);
}
}
return filename;
}
}
exports.GeneratorTeamsTab = GeneratorTeamsTab;
Oops, something went wrong.

0 comments on commit 8ad396d

Please sign in to comment.