├── .editorconfig ├── .gitignore ├── LICENSE ├── bin └── create-bot ├── package.json └── readme.md /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 2 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = true 11 | 12 | [*.md] 13 | trim_trailing_whitespace = false 14 | 15 | [*.txt] 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | 6 | # Runtime data 7 | pids 8 | *.pid 9 | *.seed 10 | 11 | # Directory for instrumented libs generated by jscoverage/JSCover 12 | lib-cov 13 | 14 | # Coverage directory used by tools like istanbul 15 | coverage 16 | 17 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) 18 | .grunt 19 | 20 | # node-waf configuration 21 | .lock-wscript 22 | 23 | # Compiled binary addons (http://nodejs.org/api/addons.html) 24 | build/Release 25 | 26 | # Dependency directory 27 | node_modules 28 | 29 | # Optional npm cache directory 30 | .npm 31 | 32 | # Optional REPL history 33 | .node_repl_history 34 | 35 | .nyc_output 36 | coverage 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017-2019 Vitaly Domnikov 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /bin/create-bot: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | const path = require('path') 4 | const sao = require('sao') 5 | 6 | sao({ generator: 'bot', outDir: path.resolve(process.argv[2] || 'my-bot') }) 7 | .run() 8 | .catch(err => { 9 | console.trace(err) 10 | process.exit(1) 11 | }) 12 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-bot", 3 | "version": "2.0.0", 4 | "description": "Telegram bot generator", 5 | "bin": { 6 | "create-bot": "./bin/create-bot" 7 | }, 8 | "engines": { 9 | "node": ">=8.5.0" 10 | }, 11 | "author": "Vitaly Domnikov ", 12 | "license": "MIT", 13 | "dependencies": { 14 | "sao": "^1.7.0" 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /readme.md: -------------------------------------------------------------------------------- 1 | # create-bot 2 | [![NPM version](https://img.shields.io/npm/v/create-bot.svg?style=flat)](https://npmjs.com/package/create-bot) 3 | 4 | CLI for fast Telegram Bot scaffolding. 5 | 6 | ## Install 7 | 8 | ```bash 9 | npm init bot cool-bot 10 | cd cool-bot 11 | ``` 12 | 13 | ```bash 14 | yarn create bot cool-bot 15 | cd cool-bot 16 | ``` 17 | 18 | ## Local install 19 | 20 | Using `yarn`: 21 | 22 | ```bash 23 | yarn global add create-bot 24 | ``` 25 | 26 | Or using `add`: 27 | 28 | ```bash 29 | npm install create-bot -g 30 | ``` 31 | 32 | ## Usage 33 | 34 | ```bash 35 | # Generate project in specific folder 36 | create-bot cool-bot 37 | cd cool-bot 38 | ``` 39 | --------------------------------------------------------------------------------