├── .editorconfig ├── .eslintignore ├── .eslintrc.js ├── .gitignore ├── LICENSE ├── README.md ├── package.json ├── src ├── inquirer.ts ├── reco-build.ts └── utils.ts └── tsconfig.json /.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | end_of_line = lf 9 | insert_final_newline = true 10 | trim_trailing_whitespace = true 11 | 12 | [*.md] 13 | insert_final_newline = false 14 | trim_trailing_whitespace = false 15 | -------------------------------------------------------------------------------- /.eslintignore: -------------------------------------------------------------------------------- 1 | styles/ 2 | images/ 3 | node_modules/ 4 | -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: '@typescript-eslint/parser', 3 | plugins: [ 4 | 'typescript' 5 | ], 6 | "env": { 7 | "browser": true, 8 | "node": true, 9 | "es6": true 10 | }, 11 | "extends": [ 12 | "eslint:recommended", 13 | ], 14 | "globals": { 15 | "Atomics": "readonly", 16 | "SharedArrayBuffer": "readonly" 17 | }, 18 | "parserOptions": { 19 | "parser": "babel-eslint", 20 | "ecmaVersion": 2018, 21 | "sourceType": "module", 22 | "allowImportExportEverywhere": true 23 | }, 24 | rules: { 25 | 'accessor-pairs': 2, 26 | 'arrow-spacing': [2, { 27 | 'before': true, 28 | 'after': true 29 | }], 30 | 'block-spacing': [2, 'always'], 31 | 'brace-style': [2, '1tbs', { 32 | 'allowSingleLine': true 33 | }], 34 | 'camelcase': [0, { 35 | 'properties': 'always' 36 | }], 37 | 'comma-dangle': [2, 'never'], 38 | 'comma-spacing': [2, { 39 | 'before': false, 40 | 'after': true 41 | }], 42 | 'comma-style': [2, 'last'], 43 | 'constructor-super': 2, 44 | 'curly': [2, 'multi-line'], 45 | 'dot-location': [2, 'property'], 46 | 'eol-last': 0, 47 | 'eqeqeq': 0, 48 | 'generator-star-spacing': [2, { 49 | 'before': true, 50 | 'after': true 51 | }], 52 | 'handle-callback-err': [2, '^(err|error)$'], 53 | 'indent': ["error", 2, { 54 | "SwitchCase": 1 55 | }], 56 | 'jsx-quotes': [2, 'prefer-single'], 57 | 'key-spacing': [2, { 58 | 'beforeColon': false, 59 | 'afterColon': true 60 | }], 61 | 'keyword-spacing': [2, { 62 | 'before': true, 63 | 'after': true 64 | }], 65 | 'new-cap': [2, { 66 | 'newIsCap': true, 67 | 'capIsNew': false 68 | }], 69 | 'new-parens': 2, 70 | 'no-array-constructor': 2, 71 | 'no-caller': 2, 72 | 'no-console': 'off', 73 | 'no-class-assign': 2, 74 | 'no-cond-assign': 2, 75 | 'no-const-assign': 2, 76 | 'no-control-regex': 0, 77 | 'no-delete-var': 2, 78 | 'no-dupe-args': 2, 79 | 'no-dupe-class-members': 2, 80 | 'no-dupe-keys': 2, 81 | 'no-duplicate-case': 2, 82 | 'no-empty-character-class': 2, 83 | 'no-empty-pattern': 2, 84 | 'no-eval': 2, 85 | 'no-ex-assign': 2, 86 | 'no-extend-native': 2, 87 | 'no-extra-bind': 2, 88 | 'no-extra-boolean-cast': 2, 89 | 'no-extra-parens': [2, 'functions'], 90 | 'no-fallthrough': 2, 91 | 'no-floating-decimal': 2, 92 | 'no-func-assign': 2, 93 | 'no-implied-eval': 2, 94 | 'no-inner-declarations': [2, 'functions'], 95 | 'no-invalid-regexp': 2, 96 | 'no-irregular-whitespace': 2, 97 | 'no-iterator': 2, 98 | 'no-label-var': 2, 99 | 'no-labels': [2, { 100 | 'allowLoop': false, 101 | 'allowSwitch': false 102 | }], 103 | 'no-lone-blocks': 2, 104 | 'no-mixed-spaces-and-tabs': 2, 105 | 'no-multi-spaces': 2, 106 | 'no-multi-str': 2, 107 | 'no-multiple-empty-lines': [2, { 108 | 'max': 1 109 | }], 110 | 'no-native-reassign': 2, 111 | 'no-negated-in-lhs': 2, 112 | 'no-new-object': 2, 113 | 'no-new-require': 2, 114 | 'no-new-symbol': 2, 115 | 'no-new-wrappers': 2, 116 | 'no-obj-calls': 2, 117 | 'no-octal': 2, 118 | 'no-octal-escape': 2, 119 | 'no-path-concat': 2, 120 | 'no-proto': 2, 121 | 'no-redeclare': 2, 122 | 'no-regex-spaces': 2, 123 | 'no-return-assign': [2, 'except-parens'], 124 | 'no-self-assign': 2, 125 | 'no-self-compare': 2, 126 | 'no-sequences': 2, 127 | 'no-shadow-restricted-names': 2, 128 | 'no-spaced-func': 2, 129 | 'no-sparse-arrays': 2, 130 | 'no-this-before-super': 2, 131 | 'no-throw-literal': 2, 132 | 'no-trailing-spaces': 2, 133 | 'no-undef': 2, 134 | 'no-undef-init': 2, 135 | 'no-unexpected-multiline': 2, 136 | 'no-unmodified-loop-condition': 2, 137 | 'no-unneeded-ternary': [2, { 138 | 'defaultAssignment': false 139 | }], 140 | 'no-unreachable': 2, 141 | 'no-unsafe-finally': 2, 142 | 'no-unused-vars': [2, { 143 | 'vars': 'all', 144 | 'args': 'none' 145 | }], 146 | 'no-useless-call': 2, 147 | 'no-useless-computed-key': 2, 148 | 'no-useless-constructor': 2, 149 | 'no-useless-escape': 0, 150 | 'no-whitespace-before-property': 2, 151 | 'no-with': 2, 152 | 'one-var': [2, { 153 | 'initialized': 'never' 154 | }], 155 | 'operator-linebreak': [2, 'after', { 156 | 'overrides': { 157 | '?': 'before', 158 | ':': 'before' 159 | } 160 | }], 161 | 'padded-blocks': [2, 'never'], 162 | 'quotes': [2, 'single', { 163 | 'avoidEscape': true, 164 | 'allowTemplateLiterals': true 165 | }], 166 | 'semi': [2, 'never'], 167 | 'semi-spacing': [2, { 168 | 'before': false, 169 | 'after': true 170 | }], 171 | 'space-before-blocks': [2, 'always'], 172 | 'space-before-function-paren': [2, 'always'], 173 | 'space-in-parens': [2, 'never'], 174 | 'space-infix-ops': 2, 175 | 'space-unary-ops': [2, { 176 | 'words': true, 177 | 'nonwords': false 178 | }], 179 | 'spaced-comment': [2, 'always', { 180 | 'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ','] 181 | }], 182 | 'template-curly-spacing': [2, 'never'], 183 | 'use-isnan': 2, 184 | 'valid-typeof': 2, 185 | 'wrap-iife': [2, 'any'], 186 | 'yield-star-spacing': [2, 'both'], 187 | 'yoda': [2, 'never'], 188 | 'prefer-const': 2, 189 | 'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0, 190 | 'object-curly-spacing': [2, 'always', { 191 | objectsInObjects: false 192 | }], 193 | 'array-bracket-spacing': [2, 'never'] 194 | } 195 | }; 196 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | bin/ 3 | yarn.lock 4 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 reco_luan 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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # @vuepress-reco/theme-cli 2 | 3 | Blog generation tool for vuepress-theme-reco 4 | 5 | ## Experience 6 | 7 | **npx** 8 | 9 | ``` 10 | npx @vuepress-reco/theme-cli init 11 | ``` 12 | 13 | **npm** 14 | 15 | ```bash 16 | # 初始化 17 | npm install @vuepress-reco/theme-cli -g 18 | theme-cli init 19 | ``` 20 | 21 | **yarn** 22 | 23 | ```bash 24 | # 初始化 25 | yarn global add @vuepress-reco/theme-cli 26 | theme-cli init 27 | ``` 28 | 29 | **test** 30 | 31 | ```bash 32 | node ./bin/reco-build.js init 33 | ``` 34 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "@vuepress-reco/theme-cli", 3 | "version": "1.0.8", 4 | "description": "A cli for vuepress-theme-reco", 5 | "scripts": { 6 | "build": "tsc ./src/*.ts --outDir ./bin/", 7 | "eslint": "eslint src --ext .ts", 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "bin": { 11 | "theme-cli": "./bin/reco-build.js" 12 | }, 13 | "files": [ 14 | "bin/" 15 | ], 16 | "repository": { 17 | "type": "git", 18 | "url": "git+https://github.com/recoluan/vuepress-theme-reco.git" 19 | }, 20 | "keywords": [ 21 | "vuepress", 22 | "vue", 23 | "theme", 24 | "reco", 25 | "cli" 26 | ], 27 | "author": "reco_luan", 28 | "license": "MIT", 29 | "bugs": { 30 | "url": "https://github.com/recoluan/vuepress-theme-reco-cli/issues" 31 | }, 32 | "homepage": "https://vuepress-theme-reco.recoluan.com", 33 | "dependencies": { 34 | "chalk": "^2.4.2", 35 | "commander": "^2.20.0", 36 | "download-git-repo": "^1.1.0", 37 | "inquirer": "^6.3.1", 38 | "ora": "^3.4.0" 39 | }, 40 | "devDependencies": { 41 | "@types/events": "^3.0.0", 42 | "@types/glob": "^7.1.1", 43 | "@types/json-schema": "^7.0.3", 44 | "@types/minimatch": "^3.0.3", 45 | "@types/node": "^12.11.7", 46 | "@types/unist": "^2.0.3", 47 | "@types/vfile": "^3.0.2", 48 | "@types/vfile-message": "^1.0.1", 49 | "@typescript-eslint/parser": "^2.5.0", 50 | "eslint": "^6.6.0", 51 | "eslint-plugin-typescript": "^0.14.0", 52 | "typescript": "^3.6.3" 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /src/inquirer.ts: -------------------------------------------------------------------------------- 1 | const inquirer = require('inquirer') 2 | 3 | const isNewDirQuestions = { 4 | name: 'isNewDir', 5 | type: 'confirm', 6 | message: `Whether to create a new directory?`, 7 | default: 'Y' 8 | } 9 | 10 | const newDirQuestion = { 11 | name: 'newDir', 12 | type: 'input', 13 | message: `What's the name of new directory?` 14 | } 15 | 16 | let questions = [ 17 | { 18 | name: 'title', 19 | type: 'input', 20 | message: `What's the title of your project?` 21 | }, 22 | { 23 | name: 'description', 24 | type: 'input', 25 | message: `What's the description of your project?` 26 | }, 27 | { 28 | name: 'author', 29 | type: 'input', 30 | message: `What's the author's name?` 31 | }, 32 | { 33 | name: 'style', 34 | type: 'list', 35 | message: `What style do you want your home page to be?(The 2.x version is the beta version)`, 36 | choices: ['blog style for 1.x', 'doc style for 1.x', '2.x'], 37 | filter: function (val: any) { 38 | return val.toLowerCase() 39 | } 40 | } 41 | ] 42 | 43 | module.exports = async function handleInquirer (isString: boolean, dir: string) { 44 | let isNewDir = false 45 | let newDir = './' 46 | if (!isString) { 47 | isNewDir = (await inquirer.prompt(isNewDirQuestions)).isNewDir 48 | if (isNewDir) { 49 | questions = [ 50 | newDirQuestion, 51 | ...questions 52 | ] 53 | } 54 | } else { 55 | newDir = dir 56 | } 57 | 58 | return new Promise((resolve, reject) => { 59 | inquirer 60 | .prompt(questions) 61 | .then((answers: any) => { 62 | resolve({ isNewDir, newDir, ...answers }) 63 | }) 64 | .catch((err: any) => { 65 | reject(err) 66 | }) 67 | }) 68 | } 69 | -------------------------------------------------------------------------------- /src/reco-build.ts: -------------------------------------------------------------------------------- 1 | #! /usr/bin/env node 2 | 3 | interface Choices { 4 | title: string, 5 | author: string, 6 | description: string, 7 | style: string, 8 | isNewDir?: string, 9 | newDir?: string 10 | } 11 | 12 | interface Spinner { 13 | start: Object, 14 | stop: Object, 15 | succeed: Object, 16 | fail: Object 17 | } 18 | 19 | const program = require('commander') 20 | const download = require('download-git-repo') 21 | const chalk = require('chalk') 22 | const ora = require('ora') 23 | const fs = require('fs') 24 | 25 | const handleInquirer = require('./inquirer.js') 26 | const spinner = ora() 27 | 28 | let stepNum = 3 29 | let currentStep = 1 30 | 31 | program 32 | .version('1.0.0') 33 | .option('-i, init [name]', '初始化 vuepress-theme-reco 主题博客') 34 | .parse(process.argv) 35 | 36 | program.on('--help', () => { 37 | console.log(' Examples:') 38 | console.log() 39 | console.log(chalk.gray(' # create a new project with an official template')) 40 | console.log(' $ reco-cli init my-blog') 41 | console.log() 42 | }) 43 | 44 | if (program.init) { 45 | const isString = typeof program.init === 'string' 46 | handleInquirer(isString, program.init) 47 | .then((choices: Choices) => { 48 | const { style, newDir } = choices 49 | program.init = newDir 50 | stepNum = style === '2.x' ? 1 : style === 'doc style for 1.x' ? 2 : 3 51 | const branchName = style === '2.x' ? '2.x' : '1.x' 52 | const gitBranch = `recoluan/vuepress-theme-reco-demo#demo/${branchName}` 53 | spinner.start(chalk.blue(`[${currentStep}/${stepNum}] Load file from git`)) 54 | 55 | download(gitBranch, program.init, function (err: Object) { 56 | if (!err) { 57 | spinner.succeed(chalk.blue(`[${currentStep}/${stepNum}] Load file from git`)) 58 | currentStep++ 59 | handleDownload(choices) 60 | } else { 61 | spinner.fail(chalk.redBright(`[${currentStep}/${stepNum}] Load file from git`)) 62 | console.info(err) 63 | spinner.stop() 64 | } 65 | }) 66 | }) 67 | .catch((err: Object) => { 68 | console.info(chalk.redBright(err)) 69 | }) 70 | } 71 | 72 | function handleDownload (choices: Choices) { 73 | if (choices.style === '2.x') { 74 | handleEnd() 75 | return 76 | } 77 | 78 | if (choices.style === 'doc style for 1.x') { 79 | changePackage(choices).then(() => { 80 | handleEnd() 81 | }) 82 | return 83 | } 84 | 85 | Promise.all([changePackage(choices), changeConfig(choices)]).then(() => { 86 | handleEnd() 87 | }) 88 | } 89 | 90 | function handleEnd () { 91 | spinner.stop() 92 | console.log() 93 | console.info(chalk.greenBright('Load successful, enjoy it!')) 94 | console.log() 95 | 96 | if (program.init !== './') { 97 | console.log(chalk.gray('# Inter your blog')) 98 | console.log(`$ cd ${program.init}`) 99 | } 100 | 101 | console.log(chalk.gray('# Install package')) 102 | console.log('$ yarn & npm install') 103 | } 104 | 105 | function changePackage (choices: Choices) { 106 | spinner.start(chalk.blue(`[${currentStep}/${stepNum}] Edit package.json`)) 107 | 108 | return new Promise((resolve) => { 109 | fs.readFile(`${process.cwd()}/${program.init}/package.json`, (err: Object, data: Object) => { 110 | if (err) throw err 111 | const _data = JSON.parse(data.toString()) 112 | _data.name = choices.title 113 | _data.description = choices.description 114 | _data.version = '1.0.0' 115 | const str = JSON.stringify(_data, null, 2) 116 | fs.writeFile(`${process.cwd()}/${program.init}/package.json`, str, function (err: Object) { 117 | if (!err) { 118 | spinner.succeed(chalk.blue(`[${currentStep}/${stepNum}] Edit package.json`)) 119 | currentStep++ 120 | resolve() 121 | } else { 122 | spinner.fail(chalk.blue(`[${currentStep}/${stepNum}] Edit package.json`)) 123 | throw err 124 | } 125 | }) 126 | }) 127 | }) 128 | } 129 | 130 | function changeConfig (choices: Choices) { 131 | spinner.start(chalk.blue(`[${currentStep}/${stepNum}] Edit config.js`)) 132 | return new Promise((resolve) => { 133 | const _data = require(`${process.cwd()}/${program.init}/.vuepress/config.js`) 134 | _data.themeConfig.type = 'blog' 135 | _data.themeConfig.author = choices.author 136 | _data.title = choices.title 137 | _data.description = choices.description 138 | const str = `module.exports = ${JSON.stringify(_data, null, 2)}` 139 | fs.writeFile(`${process.cwd()}/${program.init}/.vuepress/config.js`, str, function (err: Object) { 140 | if (!err) { 141 | spinner.succeed(chalk.blue(`[${currentStep}/${stepNum}] Edit config.js`)) 142 | currentStep++ 143 | resolve() 144 | } else { 145 | spinner.fail(chalk.blue(`[${currentStep}/${stepNum}] Edit config.js`)) 146 | throw err 147 | } 148 | }) 149 | }) 150 | } 151 | -------------------------------------------------------------------------------- /src/utils.ts: -------------------------------------------------------------------------------- 1 | function formatJSON (str: string) { 2 | str = str.replace(/(?:\s*['"]*)?([a-zA-Z0-9]+)(?:['"]*\s*)?:/g, '$1:') 3 | return str 4 | } 5 | 6 | exports.formatJSON = formatJSON 7 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | /* Basic Options */ 4 | // "incremental": true, /* Enable incremental compilation */ 5 | "target": "es5", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ 6 | "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ 7 | // "lib": [], /* Specify library files to be included in the compilation. */ 8 | // "allowJs": true, /* Allow javascript files to be compiled. */ 9 | // "checkJs": true, /* Report errors in .js files. */ 10 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ 11 | // "declaration": true, /* Generates corresponding '.d.ts' file. */ 12 | // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ 13 | // "sourceMap": true, /* Generates corresponding '.map' file. */ 14 | // "outFile": "./", /* Concatenate and emit output to single file. */ 15 | // "outDir": "./", /* Redirect output structure to the directory. */ 16 | // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 17 | // "composite": true, /* Enable project compilation */ 18 | // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ 19 | // "removeComments": true, /* Do not emit comments to output. */ 20 | // "noEmit": true, /* Do not emit outputs. */ 21 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 22 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 23 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 24 | 25 | /* Strict Type-Checking Options */ 26 | "strict": true, /* Enable all strict type-checking options. */ 27 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 28 | // "strictNullChecks": true, /* Enable strict null checks. */ 29 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 30 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ 31 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 32 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 33 | // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 34 | 35 | /* Additional Checks */ 36 | // "noUnusedLocals": true, /* Report errors on unused locals. */ 37 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 38 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 39 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 40 | 41 | /* Module Resolution Options */ 42 | // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 43 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 44 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 45 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 46 | // "typeRoots": [], /* List of folders to include type definitions from. */ 47 | "types": ["@types/node", "@types/json-schema", "@types/events", "@types/node"], /* Type declaration files to be included in compilation. */ 48 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 49 | "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 50 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 51 | // "allowUmdGlobalAccess": true, /* Allow accessing UMD globals from modules. */ 52 | 53 | /* Source Map Options */ 54 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 55 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 56 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 57 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 58 | 59 | /* Experimental Options */ 60 | // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 61 | // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 62 | } 63 | } 64 | --------------------------------------------------------------------------------