├── .gitignore ├── dist ├── cli.d.ts ├── cli.d.ts.map ├── builders.d.ts.map ├── builders.d.ts ├── builders.js.map ├── builders.js ├── cli.js.map └── cli.js ├── types ├── validate-npm-package-name.d.ts └── qoa.d.ts ├── README.md ├── tslint.json ├── package.json ├── LICENSE ├── src ├── builders.ts └── cli.ts └── tsconfig.json /.gitignore: -------------------------------------------------------------------------------- 1 | /node_modules -------------------------------------------------------------------------------- /dist/cli.d.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | export {}; 3 | //# sourceMappingURL=cli.d.ts.map -------------------------------------------------------------------------------- /dist/cli.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":""} -------------------------------------------------------------------------------- /types/validate-npm-package-name.d.ts: -------------------------------------------------------------------------------- 1 | export = index; 2 | declare function index(name: any): any; 3 | declare namespace index { 4 | const scopedPackagePattern: RegExp; 5 | } 6 | -------------------------------------------------------------------------------- /dist/builders.d.ts.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"builders.d.ts","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":"AAAA,wBAAgB,UAAU,CAAE,OAAO,EAAE,MAAM,UAW1C;AAED,wBAAgB,SAAS,CAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,UASxD;AAED,wBAAgB,SAAS,CAAE,OAAO,EAAE,MAAM,UAMzC;AAED,wBAAgB,YAAY,WAE3B"} -------------------------------------------------------------------------------- /dist/builders.d.ts: -------------------------------------------------------------------------------- 1 | export declare function getPackage(dirName: string): string; 2 | export declare function getScript(token: string, botName: string): string; 3 | export declare function getReadme(botName: string): string; 4 | export declare function getGitignore(): string; 5 | //# sourceMappingURL=builders.d.ts.map -------------------------------------------------------------------------------- /types/qoa.d.ts: -------------------------------------------------------------------------------- 1 | export = index; 2 | declare const index: { 3 | Qoa: Function; 4 | clearScreen: Function; 5 | config: Function; 6 | confirm: Function; 7 | hidden: Function; 8 | input: Function; 9 | interactive: Function; 10 | keypress: Function; 11 | prefix: Function; 12 | prompt: Function; 13 | quiz: Function; 14 | secure: Function; 15 | underlineQuery: Function; 16 | }; 17 | -------------------------------------------------------------------------------- /dist/builders.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"builders.js","sourceRoot":"","sources":["../src/builders.ts"],"names":[],"mappings":";;AAAA,SAAgB,UAAU,CAAE,OAAe;IACvC,OAAO,0BACK,OAAO,oQAQpB,CAAA;AACH,CAAC;AAXD,gCAWC;AAED,SAAgB,SAAS,CAAE,KAAa,EAAE,OAAe;IACrD,IAAM,UAAU,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,6BAA6B,CAAA;IAC3E,OAAO,QAAM,OAAO,mOAMJ,UAAU,QAAK,CAAA;AACnC,CAAC;AATD,8BASC;AAED,SAAgB,SAAS,CAAE,OAAe;IACtC,OAAO,OAAK,OAAO,0OAIrB,CAAA;AACF,CAAC;AAND,8BAMC;AAED,SAAgB,YAAY;IACxB,OAAO,eAAe,CAAA;AAC1B,CAAC;AAFD,oCAEC"} -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # create-discord-bot 2 | [![forthebadge](https://forthebadge.com/images/badges/made-with-javascript.svg)](https://forthebadge.com) 3 | 4 | 🚀 Create Discord Bot with CLI 5 | 6 | ## About 7 | Tired of Googling "How to create Discord Bot"? Use this tool and easily bootstrap your modern Discord Bot ✨ 8 | 9 | ![](https://i.imgur.com/FrXL7qi.gif) 10 | 11 | ## Use 12 | ``` 13 | npx create-discord-bot 14 | ``` 15 | 16 | Follow the instructions, this is easy! 17 | 18 | ## Generated project 19 | ``` 20 | generated-project 21 | ├── node_modules 22 | ├── bot.js 23 | ├── package.json 24 | ├── package-lock.json 25 | ├── README.md 26 | └── .gitignore 27 | ``` 28 | -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "defaultSeverity": "error", 3 | "extends": [ 4 | "tslint:recommended" 5 | ], 6 | "jsRules": {}, 7 | "rules": { 8 | "quotemark": [true, "single"], 9 | "semicolon": [ 10 | true, 11 | "never" 12 | ], 13 | "object-literal-sort-keys": false, 14 | "no-console": false, 15 | "curly": false, 16 | "trailing-comma": false, 17 | "ordered-imports": false, 18 | "arrow-parens": false, 19 | "member-access": false, 20 | "interface-name": false, 21 | "no-string-literal": false, 22 | "max-line-length": { 23 | "options": { 24 | "limit": 180 25 | } 26 | } 27 | }, 28 | "rulesDirectory": [] 29 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "create-discord-bot", 3 | "version": "0.0.5", 4 | "description": "Create Discord Bot with CLI", 5 | "main": "dist/cli.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "build": "tsc" 9 | }, 10 | "repository": { 11 | "type": "git", 12 | "url": "git+https://github.com/HZooly/create-discord-bot.git" 13 | }, 14 | "keywords": [ 15 | "discord" 16 | ], 17 | "author": "torzuoli.hugo@gmail.com", 18 | "license": "MIT", 19 | "bugs": { 20 | "url": "https://github.com/HZooly/create-discord-bot/issues" 21 | }, 22 | "homepage": "https://github.com/HZooly/create-discord-bot#readme", 23 | "bin": { 24 | "create-discord-bot": "./dist/cli.js" 25 | }, 26 | "dependencies": { 27 | "log-symbols": "^2.2.0", 28 | "qoa": "^0.2.0", 29 | "validate-npm-package-name": "^3.0.0" 30 | }, 31 | "devDependencies": { 32 | "@types/node": "^11.13.2", 33 | "tslint": "^5.15.0", 34 | "typescript": "^3.4.2" 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Hugo Torzuoli 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 | -------------------------------------------------------------------------------- /src/builders.ts: -------------------------------------------------------------------------------- 1 | export function getPackage(dirName: string) { 2 | return `{ 3 | "name": "${dirName}", 4 | "version": "0.0.1", 5 | "description": "Bot created with create-discord-bot CLI", 6 | "main": "bot.js", 7 | "author": "create-discord-bot", 8 | "dependencies": { 9 | "discord.js": "^11.3.2" 10 | } 11 | }` 12 | } 13 | 14 | export function getScript(token: string, botName: string) { 15 | const tokenValue = token.length > 0 ? token : 'your-token-from-discord-api' 16 | return `/* ${botName} generated with create-discord-bot CLI */ 17 | const Discord = require('discord.js') 18 | const client = new Discord.Client() 19 | client.on('ready', () => { 20 | console.log('Bot is ready!') 21 | }) 22 | client.login('${tokenValue}');` 23 | } 24 | 25 | export function getReadme(botName: string) { 26 | return `# ${botName} 27 | Discord Bot generated with [create-discord-bot](https://github.com/HZooly/create-discord-bot) 28 | 29 | To get the Bot invitation link, you can use [discord-bot-invitation](https://github.com/HZooly/discord-bot-invitation) 30 | ` 31 | } 32 | 33 | export function getGitignore() { 34 | return '/node_modules' 35 | } 36 | -------------------------------------------------------------------------------- /dist/builders.js: -------------------------------------------------------------------------------- 1 | "use strict"; 2 | Object.defineProperty(exports, "__esModule", { value: true }); 3 | function getPackage(dirName) { 4 | return "{\n \t\"name\": \"" + dirName + "\",\n \t\"version\": \"0.0.1\",\n \t\"description\": \"Bot created with create-discord-bot CLI\",\n \t\"main\": \"bot.js\",\n \t\"author\": \"create-discord-bot\",\n \t\"dependencies\": {\n \t\"discord.js\": \"^11.3.2\"\n \t}\n\t}"; 5 | } 6 | exports.getPackage = getPackage; 7 | function getScript(token, botName) { 8 | var tokenValue = token.length > 0 ? token : 'your-token-from-discord-api'; 9 | return "/* " + botName + " generated with create-discord-bot CLI */\n const Discord = require('discord.js')\n\tconst client = new Discord.Client()\n client.on('ready', () => {\n\t console.log('Bot is ready!')\n })\n client.login('" + tokenValue + "');"; 10 | } 11 | exports.getScript = getScript; 12 | function getReadme(botName) { 13 | return "# " + botName + "\n\t\tDiscord Bot generated with [create-discord-bot](https://github.com/HZooly/create-discord-bot)\n\n\t\tTo get the Bot invitation link, you can use [discord-bot-invitation](https://github.com/HZooly/discord-bot-invitation)\n\t"; 14 | } 15 | exports.getReadme = getReadme; 16 | function getGitignore() { 17 | return '/node_modules'; 18 | } 19 | exports.getGitignore = getGitignore; 20 | //# sourceMappingURL=builders.js.map -------------------------------------------------------------------------------- /dist/cli.js.map: -------------------------------------------------------------------------------- 1 | {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;;;;;;;;AACA,qCAAwB;AACxB,uCAA2E;AAC3E,+CAAoC;AAEpC,IAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,CAAA;AACzC,IAAM,QAAQ,GAAG,OAAO,CAAC,2BAA2B,CAAC,CAAA;AACrD,IAAM,GAAG,GAAG,OAAO,CAAC,KAAK,CAAC,CAAA;AAE1B,IAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAA;AAEvB,GAAG,CAAC,sCAAsC,CAAC,CAAA;AAY3C,IAAM,SAAS,GAAe;IAC1B;QACI,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,iCAAiC;QACxC,MAAM,EAAE,SAAS;KACpB;IACD;QACI,IAAI,EAAE,QAAQ;QACd,KAAK,EAAE,qDAAqD;QAC5D,MAAM,EAAE,OAAO;KAClB;CACJ,CAAA;AAED,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,UAAC,MAAc;IACtC,IAAM,SAAS,GAAG,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,CAAA;IAE1C,IAAI,SAAS,CAAC,MAAM,KAAK,SAAS,EAAE;QAChC,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,UAAC,KAAU;YAChC,GAAG,CAAI,UAAU,CAAC,KAAK,SAAI,KAAO,CAAC,CAAA;QACvC,CAAC,CAAC,CAAA;QACF,OAAM;KACT;IAED,IAAI,GAAG,GAAG,MAAM,CAAC,OAAO,CAAA;IACxB,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE;QACrB,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAA;QACjB,GAAG,CAAI,UAAU,CAAC,IAAI,4BAAyB,CAAC,CAAA;QAChD,EAAE,CAAC,SAAS,CAAI,GAAG,kBAAe,EAAE,qBAAU,CAAC,GAAG,CAAC,EAAE,UAAA,GAAG;YACpD,IAAI,GAAG;gBACH,OAAO,GAAG,CAAI,UAAU,CAAC,KAAK,oCAAiC,CAAC,CAAA;QACxE,CAAC,CAAC,CAAA;QAEF,GAAG,CAAI,UAAU,CAAC,IAAI,wBAAqB,CAAC,CAAA;QAC5C,EAAE,CAAC,SAAS,CAAI,GAAG,YAAS,EAAE,oBAAS,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,UAAA,GAAG;YAC3D,IAAI,GAAG;gBACH,OAAO,GAAG,CAAI,UAAU,CAAC,KAAK,8BAA2B,CAAC,CAAA;QAClE,CAAC,CAAC,CAAA;QAEF,GAAG,CAAI,UAAU,CAAC,IAAI,8BAA2B,CAAC,CAAA;QAClD,EAAE,CAAC,SAAS,CAAI,GAAG,gBAAa,EAAE,uBAAY,EAAE,EAAE,UAAA,GAAG;YACjD,IAAI,GAAG;gBACH,OAAO,GAAG,CAAI,UAAU,CAAC,KAAK,kCAA+B,CAAC,CAAA;QACtE,CAAC,CAAC,CAAA;QAEF,GAAG,CAAI,UAAU,CAAC,IAAI,0BAAuB,CAAC,CAAA;QAC9C,EAAE,CAAC,SAAS,CAAI,GAAG,eAAY,EAAE,oBAAS,CAAC,GAAG,CAAC,EAAE,UAAA,GAAG;YAChD,IAAI,GAAG;gBACH,OAAO,GAAG,CAAI,UAAU,CAAC,KAAK,8BAA2B,CAAC,CAAA;QAClE,CAAC,CAAC,CAAA;QAEF,GAAG,CAAI,UAAU,CAAC,IAAI,gCAA6B,CAAC,CAAA;QACpD,oBAAI,CAAC,QAAM,GAAG,oBAAiB,EAAE,UAAC,GAAG,EAAE,MAAM,EAAE,MAAM;YACjD,GAAG,CAAI,UAAU,CAAC,OAAO,WAAQ,CAAC,CAAA;QACtC,CAAC,CAAC,CAAA;KACL;AACL,CAAC,CAAC,CAAA"} -------------------------------------------------------------------------------- /src/cli.ts: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | import * as fs from 'fs' 3 | import { getPackage, getGitignore, getReadme, getScript } from './builders' 4 | import { exec } from 'child_process' 5 | 6 | import logSymbols from 'log-symbols' 7 | import validate from 'validate-npm-package-name' 8 | import qoa from 'qoa' 9 | 10 | const log = console.log 11 | 12 | log('Welcome to the Discord Bot Creator !') 13 | 14 | interface Question { 15 | type: string, 16 | query: string, 17 | handle: string 18 | } 19 | 20 | interface Answer { 21 | botName: string, 22 | token: string 23 | } 24 | const questions: Question[] = [ 25 | { 26 | type: 'input', 27 | query: 'What will be your bot\'s name ?', 28 | handle: 'botName' 29 | }, 30 | { 31 | type: 'secure', 32 | query: 'Enter your Discord\'s token (press enter for empty)', 33 | handle: 'token' 34 | } 35 | ] 36 | 37 | qoa.prompt(questions).then((answer: Answer) => { 38 | const validated = validate(answer.botName) 39 | 40 | if (validated.errors !== undefined) { 41 | validated.errors.forEach((error: any) => { 42 | log(`${logSymbols.error} ${error}`) 43 | }) 44 | return 45 | } 46 | 47 | const dir = answer.botName 48 | if (!fs.existsSync(dir)) { 49 | fs.mkdirSync(dir) 50 | log(`${logSymbols.info} Creating new folder...`) 51 | fs.writeFile(`${dir}/package.json`, getPackage(dir), err => { 52 | if (err) 53 | return log(`${logSymbols.error} Error at creating package.json`) 54 | }) 55 | 56 | log(`${logSymbols.info} Creating bot.js...`) 57 | fs.writeFile(`${dir}/bot.js`, getScript(answer.token, dir), err => { 58 | if (err) 59 | return log(`${logSymbols.error} Error at bot.js creation`) 60 | }) 61 | 62 | log(`${logSymbols.info} Generating .gitignore...`) 63 | fs.writeFile(`${dir}/.gitignore`, getGitignore(), err => { 64 | if (err) 65 | return log(`${logSymbols.error} Error at .gitignore creation`) 66 | }) 67 | 68 | log(`${logSymbols.info} Writing README.md...`) 69 | fs.writeFile(`${dir}/README.md`, getReadme(dir), err => { 70 | if (err) 71 | return log(`${logSymbols.error} Error at README creation`) 72 | }) 73 | 74 | log(`${logSymbols.info} Installing dependencies...`) 75 | exec(`cd ${dir} && npm install`, (err, stdout, stderr) => { 76 | log(`${logSymbols.success} Done!`) 77 | }) 78 | } 79 | }) 80 | -------------------------------------------------------------------------------- /dist/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | "use strict"; 3 | var __importStar = (this && this.__importStar) || function (mod) { 4 | if (mod && mod.__esModule) return mod; 5 | var result = {}; 6 | if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k]; 7 | result["default"] = mod; 8 | return result; 9 | }; 10 | Object.defineProperty(exports, "__esModule", { value: true }); 11 | var fs = __importStar(require("fs")); 12 | var builders_1 = require("./builders"); 13 | var child_process_1 = require("child_process"); 14 | var logSymbols = require('log-symbols'); 15 | var validate = require("validate-npm-package-name"); 16 | var qoa = require('qoa'); 17 | var log = console.log; 18 | log('Welcome to the Discord Bot Creator !'); 19 | var questions = [ 20 | { 21 | type: 'input', 22 | query: 'What will be your bot\'s name ?', 23 | handle: 'botName' 24 | }, 25 | { 26 | type: 'secure', 27 | query: 'Enter your Discord\'s token (press enter for empty)', 28 | handle: 'token' 29 | } 30 | ]; 31 | qoa.prompt(questions).then(function (answer) { 32 | var validated = validate(answer.botName); 33 | if (validated.errors !== undefined) { 34 | validated.errors.forEach(function (error) { 35 | log(logSymbols.error + " " + error); 36 | }); 37 | return; 38 | } 39 | var dir = answer.botName; 40 | if (!fs.existsSync(dir)) { 41 | fs.mkdirSync(dir); 42 | log(logSymbols.info + " Creating new folder..."); 43 | fs.writeFile(dir + "/package.json", builders_1.getPackage(dir), function (err) { 44 | if (err) 45 | return log(logSymbols.error + " Error at creating package.json"); 46 | }); 47 | log(logSymbols.info + " Creating bot.js..."); 48 | fs.writeFile(dir + "/bot.js", builders_1.getScript(answer.token, dir), function (err) { 49 | if (err) 50 | return log(logSymbols.error + " Error at bot.js creation"); 51 | }); 52 | log(logSymbols.info + " Generating .gitignore..."); 53 | fs.writeFile(dir + "/.gitignore", builders_1.getGitignore(), function (err) { 54 | if (err) 55 | return log(logSymbols.error + " Error at .gitignore creation"); 56 | }); 57 | log(logSymbols.info + " Writing README.md..."); 58 | fs.writeFile(dir + "/README.md", builders_1.getReadme(dir), function (err) { 59 | if (err) 60 | return log(logSymbols.error + " Error at README creation"); 61 | }); 62 | log(logSymbols.info + " Installing dependencies..."); 63 | child_process_1.exec("cd " + dir + " && npm install", function (err, stdout, stderr) { 64 | log(logSymbols.success + " Done!"); 65 | }); 66 | } 67 | }); 68 | //# sourceMappingURL=cli.js.map -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "baseUrl": ".", 4 | "paths": { "*": ["types/*"] }, 5 | /* Basic Options */ 6 | "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ 7 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 8 | // "lib": [], /* Specify library files to be included in the compilation. */ 9 | // "allowJs": true, /* Allow javascript files to be compiled. */ 10 | // "checkJs": true, /* Report errors in .js files. */ 11 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ 12 | "declaration": true, /* Generates corresponding '.d.ts' file. */ 13 | "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ 14 | "sourceMap": true, /* Generates corresponding '.map' file. */ 15 | // "outFile": "./", /* Concatenate and emit output to single file. */ 16 | "outDir": "./dist", /* Redirect output structure to the directory. */ 17 | "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 18 | // "composite": true, /* Enable project compilation */ 19 | // "incremental": true, /* Enable incremental compilation */ 20 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ 21 | "removeComments": true, /* Do not emit comments to output. */ 22 | // "noEmit": true, /* Do not emit outputs. */ 23 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 24 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 25 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 26 | 27 | /* Strict Type-Checking Options */ 28 | "strict": true, /* Enable all strict type-checking options. */ 29 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 30 | // "strictNullChecks": true, /* Enable strict null checks. */ 31 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 32 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ 33 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 34 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 35 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 36 | 37 | /* Additional Checks */ 38 | // "noUnusedLocals": true, /* Report errors on unused locals. */ 39 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 40 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 41 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 42 | 43 | /* Module Resolution Options */ 44 | // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 45 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 46 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 47 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 48 | // "typeRoots": [], /* List of folders to include type definitions from. */ 49 | // "types": [], /* Type declaration files to be included in compilation. */ 50 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 51 | "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 52 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 53 | 54 | /* Source Map Options */ 55 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 56 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 57 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 58 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 59 | 60 | /* Experimental Options */ 61 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 62 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 63 | } 64 | } 65 | --------------------------------------------------------------------------------