Created
January 15, 2021 20:08
-
-
Save iksena/424b8ef3bb29f003fc5ef3681df14c29 to your computer and use it in GitHub Desktop.
yo microservice writing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Generator = require('yeoman-generator'); | |
class MicroserviceGenerator extends Generator { | |
// ...other tasks | |
writing() { | |
const templates = [ | |
'.dockerignore', | |
'.env', | |
'.eslintrc.yml', | |
'Dockerfile', | |
'package.json', | |
'tsconfig.json', | |
'tslint.json', | |
'config/index.ts', | |
'src/index.ts', | |
'src/routes/index.ts', | |
]; | |
templates.forEach((filePath) => { | |
this.fs.copyTpl( | |
this.templatePath(filePath), | |
this.destinationPath(filePath), | |
this.answers, | |
); | |
}); | |
} | |
} | |
module.exports = MicroserviceGenerator |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment