diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c4f85e9d2..4819722cb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,7 @@ # HOW TO CONTRIBUTE -* 1. Welcome your pr! Before pr, talk about situations in the [issue](https://github.com/MuYunyun/create-react-doc/issues/new) firstly. If the situation is reasonable, go to the next step; -* 2. Switch to the new branch based main, submit the pr with after finishing the feature. +1. Welcome your pr! Before pr, talk about situations in the [issue](https://github.com/MuYunyun/create-react-doc/issues/new) firstly. If the situation is reasonable, go to the next step; +2. Switch to the new branch based main, submit the pr to branch `qa/latest` after finishing development. ## DEV @@ -14,3 +14,11 @@ $ yarn && yarn bootstrap && yarn start ``` And now you can see the document is running at http://localhost:3000. + +## Test + +After merging pr to qa/latest and publish beta package. You should verify the feature/bugfix with following bash: + +```js +yarn add create-react-doc@beta +``` \ No newline at end of file diff --git a/config.yml b/config.yml index 7a87e8030..a68fa723b 100644 --- a/config.yml +++ b/config.yml @@ -5,12 +5,13 @@ title: Create React Doc # Menu dir ## you can also set detailed dir, such as BasicSkill/css -menu: docs/快速上手.md,docs/站点发布.md,docs/config.yml.md,docs/高阶用法.md,docs/其它工具.md +menu: docs/快速上手.md,docs/站点发布.md,docs/config.yml.md,docs/高阶用法.md,docs/自定义主题.md,docs/其它工具.md ## set init open menu keys # menuOpenKeys: # site theme -theme: crd-seed +devTheme: packages/crd-seed/index +# theme: crd-seed # Github ## if you want to editing pages on github, you should config these arguments. diff --git a/docs/config.yml.md b/docs/config.yml.md index d0e49fe6c..2a973cbe5 100644 --- a/docs/config.yml.md +++ b/docs/config.yml.md @@ -4,15 +4,16 @@ 它支持的属性如下 -| 属性名 | 作用 | 类型 | 默认 | -| :------------: | :---------------------------: | :---------: | :------: | -| title | 站点名 | string | | -| menu | 作为站点菜单的文件/文件夹路径 | string | | -| menuOpenKeys | 默认展开菜单的文件夹路径 | string | | -| theme | 使用主题 | string | crd-seed | -| user | Github 用户名 | string | | -| repo | Github 项目名 | string | | -| language | 站点语言 | en \| zh-cn | en | -| github-ribbons | 是否在右上角显示 github 丝带 | boolean | false | +| 属性名 | 作用 | 类型 | 默认 | +| :------------: | :-------------------------------: | :---------: | :------: | +| title | 站点名 | string | | +| menu | 作为站点菜单的文件/文件夹路径 | string | | +| menuOpenKeys | 默认展开菜单的文件夹路径 | string | | +| user | Github 用户名 | string | | +| repo | Github 项目名 | string | | +| language | 站点语言 | en \| zh-cn | en | +| github-ribbons | 是否在右上角显示 github 丝带 | boolean | false | +| theme | 使用主题 | string | crd-seed | +| devTheme | 开发自定义主题时, 需设置其为 true | string | ./index | 详细用法可以参考 [config.yml]](https://github.com/MuYunyun/blog/blob/main/config.yml)。 \ No newline at end of file diff --git "a/docs/\350\207\252\345\256\232\344\271\211\344\270\273\351\242\230.md" "b/docs/\350\207\252\345\256\232\344\271\211\344\270\273\351\242\230.md" index bf27f69ee..821a24319 100644 --- "a/docs/\350\207\252\345\256\232\344\271\211\344\270\273\351\242\230.md" +++ "b/docs/\350\207\252\345\256\232\344\271\211\344\270\273\351\242\230.md" @@ -1,7 +1,89 @@ -### 替换主题 +### 使用自定义主题 -在 `config.yml` 文件中的 theme 替换为你想使用的主题即可。 +切换主题非常简单, 只需要将根目录文件 `config.yml` 中的 `theme` 更改为您想使用的主题即可。 ```diff + theme: custom-theme +``` + +### 如何开发自定义主题包 + +create-react-doc 脚手架提供了脚本命令 `react-doc theme` 用来一键创建主题包开发环境。 + + + +```bash +// 安装 create-react-doc +yarn add create-react-doc -g +// 执行 `react-doc theme` 并输入主题包名字 +react-doc theme +``` + +进入到所创建主题目录, 执行 `yarn && yarn start`, 浏览器会自动打开浏览器, 并在屏幕中央显示 `Welcome to your own theme`。 + + + +恭喜你, 此时你已经将主题开发环境配置完成。接着便可以开始愉快地定制个人主题了。 + +在所创建的主题项目中支持使用 `React 17` 以及 `less` 语法。 + +```js +import { Switch, Route } from 'react-router-dom' +import styles from './index.less' + +const CustomTheme = (props: CustomThemeProps) => { + return ( + + Welcome to your own theme} + /> + + ) +} + +export default CustomTheme +``` + +CustomThemeProps 的接口类型定义如下, 自定义主题时可以自由使用它们。 + +```js +interface CustomThemeProps { + menuSource: { + // 文件名称 eg: '快速上手.md' + name: string + // 文件扩展名 eg: '.md' + extension: string + // 文件路径 eg: '/docs/快速上手.md' + path: string + // 路由路径 eg: ‘/快速上手’ + routePath: string + // 文件大小 eg: 924 + size: number + // 文件类型 eg: 'file' + type: string + // 文件创建日期 eg: '2020-11-11' + birthtime: string + // 文件修改日期 eg: '2021-01-14' + mtime: string + }[] +} +``` + +此外在自定义主题文件中可以自由使用由 webpack 注入的 `DOCSCONFIG` 对象中的变量, DOCSCONFIG 中的变量与项目根目录中的 `config.yml` 文件变量一一对应。 + +比如 `config.yml` 配置如下所示: + +```bash +menu: Introduction +theme: crd-seed +user: muyunyun +repo: https://github.com/MuYunyun/create-react-doc +language: en +``` + +则主题项目中则可以通过如下方式获取到 `config.yml` 配置属性。 + +```js +const { menu, theme, user, } = DOCSCONFIG || {} ``` \ No newline at end of file diff --git a/injectLogic/index.js b/injectLogic/index.js index 77fee710e..3226cbca2 100644 --- a/injectLogic/index.js +++ b/injectLogic/index.js @@ -1,11 +1,11 @@ /* eslint-disable no-empty */ // perf inject logic only once -const inject = () => {}; +const inject = () => {} // perf injectWithPathname logic every pathname changes const injectWithPathname = (pathname) => { // demo for using mathjax. see https://github.com/MuYunyun/create-react-doc/issues/63 - if (pathname !== '/高阶用法') return; + if (pathname !== '/高阶用法') return window.MathJax = { tex: { inlineMath: [['$', '$'], ['\\(', '\\)']], @@ -13,21 +13,21 @@ const injectWithPathname = (pathname) => { svg: { fontCache: 'global', }, - }; - const script = document.createElement('script'); - script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js'; - const tag = 'mathjax'; - script.id = tag; - script.async = true; - const scriptNode = document.getElementById(tag); + } + const script = document.createElement('script') + script.src = 'https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-svg.js' + const tag = 'mathjax' + script.id = tag + script.async = true + const scriptNode = document.getElementById(tag) try { if (!scriptNode) { - document.head.appendChild(script); + document.head.appendChild(script) } else { - scriptNode.remove(); - document.head.appendChild(script); + scriptNode.remove() + document.head.appendChild(script) } } catch (error) {} -}; +} -module.exports = { inject, injectWithPathname }; +module.exports = { inject, injectWithPathname } diff --git a/lerna.json b/lerna.json index 050b9e147..dd13338f5 100644 --- a/lerna.json +++ b/lerna.json @@ -7,7 +7,7 @@ ] }, "publish": { - "allowBranch": "main", + "allowBranch": ["main", "qa/latest"], "message": "chore: publish" } }, diff --git a/packages/create-react-doc/index.js b/packages/create-react-doc/index.js index 2a9f6cb75..44ba81eaf 100755 --- a/packages/create-react-doc/index.js +++ b/packages/create-react-doc/index.js @@ -4,6 +4,7 @@ const path = require('path') const program = require('commander') const { initProject, + initTheme, initCache, Deploy, paths, @@ -11,6 +12,7 @@ const { Servers, Build, } = require('crd-scripts') +const input = require('@inquirer/input') const pkg = require('./package.json') program @@ -19,6 +21,7 @@ program .option('start', 'Documents generated.') .option('build', 'Build the documents generated.') .option('deploy', 'Deploy site to gh-pages.') + .option('theme', 'Create a new theme') .option('-o, --output ', 'Writes the compiled file to the disk directory.', '.crd-dist') .option('-p, --port [number]', 'The port.', 3000) .option('--host [host]', 'The host.', '0.0.0.0') @@ -34,7 +37,23 @@ program }) // the third value in process.argv is the value we want. .parse(process.argv) -if (!program.start && !program.build && !program.deploy) return initProject(program) + +const { start, build, deploy, theme } = program + +if (!start && !build && !deploy && !theme) return initProject(program) + +if (theme) { + return input({ + message: "What's the theme name?", + validate: (inputThemeName) => { + if (inputThemeName.length === 0) return 'Please input correct theme name' + return true + }, + }).then((themeName) => { + initTheme(themeName) + }) +} + // create-react-doc tool root dir. // program.crdPath = path.join(__dirname, '../'); // all markdown dir @@ -44,7 +63,7 @@ program.output = path.join(process.cwd(), program.output) const docsConfig = getDocsConfig() // assign all the markdown dir -if (program.start || program.build) { +if (start || build) { fs.existsSync(paths.docsReadme) && program.markdownPaths.push(paths.docsReadme) @@ -56,13 +75,13 @@ if (program.start || program.build) { ) } -if (program.build && fs.pathExistsSync(paths.docsBuildDist)) { +if (build && fs.pathExistsSync(paths.docsBuildDist)) { // clean dir fs.emptyDirSync(paths.docsBuildDist) } // deploy code to special git repo and branch. -if (program.deploy) { +if (deploy) { return Deploy(program, docsConfig) } @@ -81,7 +100,7 @@ program.markdownPaths.forEach((item) => { if (isExists) { fs.ensureDirSync(paths.cacheDirPath) initCache(program, () => { - if (program.build) { + if (build) { Build(program) } else { Servers(program) diff --git a/packages/create-react-doc/package.json b/packages/create-react-doc/package.json index 7d3241558..06bece387 100644 --- a/packages/create-react-doc/package.json +++ b/packages/create-react-doc/package.json @@ -24,6 +24,7 @@ }, "license": "MIT", "dependencies": { + "@inquirer/input": "^0.0.13-alpha.0", "commander": "^2.12.2", "crd-scripts": "^0.2.27", "crd-templates": "^0.2.26", diff --git a/packages/scripts/index.js b/packages/scripts/index.js index b5099d157..322bbabd4 100644 --- a/packages/scripts/index.js +++ b/packages/scripts/index.js @@ -1,4 +1,5 @@ const initProject = require('./src/commands/initProject') +const initTheme = require('./src/commands/initTheme') const initCache = require('./src/utils/initCache') const Servers = require('./src/server') const Build = require('./src/build') @@ -8,6 +9,7 @@ const { getDocsConfig } = require('./src/utils') module.exports = { initProject, + initTheme, initCache, Servers, Build, diff --git a/packages/scripts/src/commands/initProject.js b/packages/scripts/src/commands/initProject.js index e48d3a05d..0e7c1be09 100644 --- a/packages/scripts/src/commands/initProject.js +++ b/packages/scripts/src/commands/initProject.js @@ -21,11 +21,13 @@ module.exports = function (params) { fs.ensureDirSync(outDir) } + const defaultTemplatePath = `${paths.templatePath}/default` + // copy template, see https://github.com/MuYunyun/create-react-doc/issues/50 - if (!fs.pathExistsSync(paths.defaultTemplatePath)) { + if (!fs.pathExistsSync(defaultTemplatePath)) { execSync('mkdir temp && cd temp && yarn add crd-templates -D') } - copyTemplate(paths.defaultTemplatePath, outDir, { + copyTemplate(defaultTemplatePath, outDir, { name: projectName, crdVersion: CRD_VERSION, }, (err, createdFiles) => { @@ -34,7 +36,7 @@ module.exports = function (params) { log(` ${'create'.green} ${createdFile.replace(paths.projectPath, '')}`) }) // this is to hack https://github.com/yoshuawuyts/copy-template-dir/issues/16 - execSync(`cp -r ${paths.defaultTemplatePath}/.github ${outDir}`) + execSync(`cp -r ${defaultTemplatePath}/.github ${outDir}`) execSync('rm -rf temp') log('\n initialization finished!\n'.green) const cmdstr = `cd ${projectName} && yarn && yarn start`.cyan diff --git a/packages/scripts/src/commands/initTheme.js b/packages/scripts/src/commands/initTheme.js new file mode 100644 index 000000000..41b123908 --- /dev/null +++ b/packages/scripts/src/commands/initTheme.js @@ -0,0 +1,43 @@ +/** + * This file is to init theme quickly. + */ +const path = require('path') +const { execSync } = require('child_process') +const fs = require('fs-extra') +const copyTemplate = require('copy-template-dir') +const paths = require('../conf/path') + +const log = console.log; // eslint-disable-line + +// eslint-disable-next-line no-unused-vars +module.exports = function (themeName) { + const outDir = path.join(paths.projectPath, themeName) + + const crdpkg = require(paths.crdPackage); // eslint-disable-line + // replace the last vertion with x, so it'll install autoly when the last vertion changes. + const CRD_VERSION = crdpkg.version.split('.').slice(0, 2).concat('x').join('.') + + // clear output dir + if (!fs.pathExistsSync(outDir)) { + fs.ensureDirSync(outDir) + } + + const defaultTemplatePath = `${paths.templatePath}/theme/default` + + if (!fs.pathExistsSync(defaultTemplatePath)) { + execSync('mkdir temp && cd temp && yarn add crd-templates -D') + } + copyTemplate(defaultTemplatePath, outDir, { + name: themeName, + crdVersion: CRD_VERSION, + }, (err, createdFiles) => { + if (err) return log(`Copy Tamplate Error: ${err} !!!`.red) + createdFiles.sort().forEach((createdFile) => { + log(` ${'create'.green} ${createdFile.replace(paths.projectPath, '')}`) + }) + execSync('rm -rf temp') + log('\n initialization finished!\n'.green) + const cmdstr = `cd ${themeName} && yarn && yarn start`.cyan + log(` Run the ${cmdstr} to start the website.\n\n`) + }) +} diff --git a/packages/scripts/src/conf/path.js b/packages/scripts/src/conf/path.js index bd297bd85..521d0636d 100644 --- a/packages/scripts/src/conf/path.js +++ b/packages/scripts/src/conf/path.js @@ -68,28 +68,40 @@ const logoPath = () => { } let theme = '' +// theme in develop mode. +let devTheme = false const docsConfigPath = resolveApp('config.yml') -if (docsConfigPath) { - const docsConfig = getDocsConfig() - theme = docsConfig.theme +const getTheme = () => { + if (docsConfigPath) { + const docsConfig = getDocsConfig() + if (!docsConfig) return + if (docsConfig.devTheme) { + devTheme = docsConfig.devTheme + theme = docsConfig.devTheme + } else { + theme = docsConfig.theme - // install custom theme - if (!fs.existsSync(resolveApp(`node_modules/${theme}`))) { - // todo: chalkblue(xxx) not show in the terminal - chalk.blue(`Install theme ${theme}`) - // -W means ignore-workspace-root-check - execSync(`yarn add ${theme} -D -W`) - chalk.blue(`Install theme ${theme} done`) - } else { - chalk.blue(`Upgrade theme ${theme}`) - // -W means ignore-workspace-root-check - execSync(`yarn upgrade ${theme}`) - chalk.blue(`Upgrade theme ${theme} done`) + // install custom theme + if (!fs.existsSync(resolveApp(`node_modules/${theme}`))) { + // todo: chalkblue(xxx) not show in the terminal + chalk.blue(`Install theme ${theme}`) + // -W means ignore-workspace-root-check + execSync(`yarn add ${theme} -D -W`) + chalk.blue(`Install theme ${theme} done`) + } else { + chalk.blue(`Upgrade theme ${theme}`) + // -W means ignore-workspace-root-check + execSync(`yarn upgrade ${theme}`) + chalk.blue(`Upgrade theme ${theme} done`) + } + } } } +getTheme() + // get exclude folders function getExcludeFoldersRegExp() { if (!fs.existsSync(modPath)) return [] @@ -126,9 +138,12 @@ module.exports = { cacheDirPath: resolveApp('.cache'), searchFilePath: resolveApp('.cache/search.js'), watchFilePath: resolveApp('.cache/watch-dir.js'), + templatePath: resolveApp('node_modules/crd-templates'), defaultHTMLPath: resolveApp('node_modules/crd-theme/index.html'), - defaultTemplatePath: resolveApp('node_modules/crd-templates/default'), - defaultTheme: resolveApp(`node_modules/${theme}`), + defaultTemplateThemePath: resolveApp('node_modules/crd-templates/theme/default'), + defaultTheme: devTheme + ? resolveApp(`${devTheme}`) + : resolveApp(`node_modules/${theme}`), defaultNodeModules: modPath, projectPath: appDirectory, publicPath: '', diff --git a/packages/scripts/src/conf/webpack.config.dev.js b/packages/scripts/src/conf/webpack.config.dev.js index 890093e56..fdd77de86 100644 --- a/packages/scripts/src/conf/webpack.config.dev.js +++ b/packages/scripts/src/conf/webpack.config.dev.js @@ -10,6 +10,7 @@ const config = require('./webpack.config') const paths = require('./path') module.exports = function (cmd) { + console.log('upath.normalizeSafe(paths.defaultTheme)', upath.normalizeSafe(paths.defaultTheme)) const docsConfig = getDocsConfig() config.mode = 'development' config.entry = [ diff --git a/packages/scripts/src/conf/webpack.config.js b/packages/scripts/src/conf/webpack.config.js index 083563787..f1e5ff2d7 100644 --- a/packages/scripts/src/conf/webpack.config.js +++ b/packages/scripts/src/conf/webpack.config.js @@ -27,7 +27,7 @@ if (paths.docsConfig) { // define.SEARCHCONTENT = searchContent && searchContent.toString(); // if there is inject logic in docsConfig - if (docsConfig.inject && fs.existsSync(resolveApp(docsConfig.inject))) { + if (docsConfig && docsConfig.inject && fs.existsSync(resolveApp(docsConfig.inject))) { define.INJECT = require(resolveApp(docsConfig.inject)) } } @@ -42,25 +42,6 @@ module.exports = { }, module: { rules: [ - // { - // test: /\.(js|jsx|mjs)$/, - // exclude: [/node_modules/, /\.(cache)/, /crd-theme-(.*)/], - // enforce: 'pre', - // use: [ - // // TODO:禁用require.ensure也不是一种标准的语言特征。 - // // 我们等待 https://github.com/facebookincubator/create-react-app/issues/2176。 - // // { parser: { requireEnsure: false } }, - // { - // // 首先运行 linter。 - // // 在 Babel 处理 js 之前做这一点很重要。 - // options: { - // eslintPath: require.resolve('eslint'), - // configFile: require.resolve('../../.eslintrc.js'), - // }, - // loader: require.resolve('eslint-loader'), - // }, - // ], - // }, { // “oneOf”将遍历所有以下加载程序,直到一个符合要求。 // 当没有加载器匹配时,它将返回到加载程序列表末尾的“file”加载器。 diff --git a/packages/scripts/src/deploy.js b/packages/scripts/src/deploy.js index ff5a34f79..3f48e5c5a 100644 --- a/packages/scripts/src/deploy.js +++ b/packages/scripts/src/deploy.js @@ -1,4 +1,3 @@ -const fs = require('fs') const ghpages = require('gh-pages') const loading = require('loading-cli') diff --git a/packages/templates/theme/default/Introduction/hello_world.md b/packages/templates/theme/default/Introduction/hello_world.md new file mode 100644 index 000000000..9183fa2e1 --- /dev/null +++ b/packages/templates/theme/default/Introduction/hello_world.md @@ -0,0 +1,3 @@ +Write docs happily now. + +If there is any problem, welcome give issue [there](https://github.com/MuYunyun/create-react-doc/issues). diff --git a/packages/templates/theme/default/README.md b/packages/templates/theme/default/README.md new file mode 100644 index 000000000..e7f495bac --- /dev/null +++ b/packages/templates/theme/default/README.md @@ -0,0 +1,15 @@ + _.-"\ + _.-" \ + ,-" \ + \ create \ + \ \ react \ + \ \ doc \ + \ \ _.-; + \ \ _.-" : + \ \,-" _.-" + \( _.-" + `--" + +### {{name}} + +This is {{name}} theme for [create-react-doc](https://github.com/MuYunyun/create-react-doc). \ No newline at end of file diff --git a/packages/templates/theme/default/_.gitignore b/packages/templates/theme/default/_.gitignore new file mode 100644 index 000000000..ac737c858 --- /dev/null +++ b/packages/templates/theme/default/_.gitignore @@ -0,0 +1,7 @@ +node_modules +package-lock.json +.DS_Store +.cache +.crd-dist +config.yml +Introduction \ No newline at end of file diff --git a/packages/templates/theme/default/_.npmrc b/packages/templates/theme/default/_.npmrc new file mode 100644 index 000000000..a7b95f944 --- /dev/null +++ b/packages/templates/theme/default/_.npmrc @@ -0,0 +1,2 @@ +# .npmrc +registry=https://registry.npmjs.org/ diff --git a/packages/templates/theme/default/_config.yml b/packages/templates/theme/default/_config.yml new file mode 100644 index 000000000..798665c9d --- /dev/null +++ b/packages/templates/theme/default/_config.yml @@ -0,0 +1,21 @@ +# details see http://muyunyun.cn/create-react-doc/#/config.yml + +# Site +# title: + +# Menu dir +## you can also set detailed dir, such as BasicSkill/css +menu: Introduction +## set init open menu keys +# menuOpenKeys: + +# site theme +devTheme: ./index + +# Github +## if you want to editing pages on github, you should config these arguments. +# user: +# repo: + +# Available values: en | zh-cn +language: en \ No newline at end of file diff --git a/packages/templates/theme/default/_index.js b/packages/templates/theme/default/_index.js new file mode 100644 index 000000000..dd4687a0d --- /dev/null +++ b/packages/templates/theme/default/_index.js @@ -0,0 +1,16 @@ +// The position of current index.js should be kept. +import { Switch, Route } from 'react-router-dom' +import styles from './index.less' + +const {{name}} = (props) => { + return ( + + Welcome to your own theme} + /> + + ) +} + +export default {{name}} diff --git a/packages/templates/theme/default/_index.less b/packages/templates/theme/default/_index.less new file mode 100644 index 000000000..c8cef1f32 --- /dev/null +++ b/packages/templates/theme/default/_index.less @@ -0,0 +1,7 @@ +.center { + height: 100vh; + width: 100vw; + display: flex; + align-items: center; + justify-content: center; +} \ No newline at end of file diff --git a/packages/templates/theme/default/_package.json b/packages/templates/theme/default/_package.json new file mode 100644 index 000000000..d832f1797 --- /dev/null +++ b/packages/templates/theme/default/_package.json @@ -0,0 +1,24 @@ +{ + "name": "{{name}}", + "version": "0.1.0", + "description": "{{name}} theme for create-react-doc", + "main": "index.js", + "scripts": { + "start": "react-doc start" + }, + "keywords": [ + "{{name}}", + "react-doc", + "react", + "create-react-doc", + "theme" + ], + "devDependencies": { + "create-react-doc": "{{crdVersion}}" + }, + "dependencies": { + "react-router-dom": "^4.2.2" + }, + "author": "", + "license": "MIT" +} diff --git a/packages/theme/index.js b/packages/theme/index.js index 88b29def9..cdd40637f 100644 --- a/packages/theme/index.js +++ b/packages/theme/index.js @@ -18,7 +18,6 @@ export default function (Lazyload, props) { // support for custom theme. const CustomTheme = require('__project_theme__').default - return ( // use custom theme here. diff --git a/yarn.lock b/yarn.lock index 23e2d8597..e5e1a5e1b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1127,6 +1127,29 @@ unique-filename "^1.1.1" which "^1.3.1" +"@inquirer/core@^0.0.13-alpha.0": + version "0.0.13-alpha.0" + resolved "https://registry.npmjs.org/@inquirer/core/-/core-0.0.13-alpha.0.tgz#374e901cc2aff56fc3f565c2fde5d5053145035f" + integrity sha512-vIXwLW793Z7VUZEfgS9GuEaxwxa4e+OU5TjrZGbkPb4QRnJAhRGgsuAizNgGltKxTRdpn+UD0qloCaAnHPOMbQ== + dependencies: + ansi-escapes "^4.2.1" + chalk "^4.1.0" + cli-spinners "^2.2.0" + cli-width "^3.0.0" + lodash "^4.17.19" + mute-stream "^0.0.8" + run-async "^2.3.0" + string-width "^4.1.0" + strip-ansi "^6.0.0" + +"@inquirer/input@^0.0.13-alpha.0": + version "0.0.13-alpha.0" + resolved "https://registry.npmjs.org/@inquirer/input/-/input-0.0.13-alpha.0.tgz#ea2eb290723016fdf195ebe0d6e02a46ad266320" + integrity sha512-Pjc+WreJI0L3HRqGPSIWqdUIRSogKN/mznh1JW8VqEQHCyQ30vJtN7hePylmdoppLf9Np1pe3rfThl/wcAv1og== + dependencies: + "@inquirer/core" "^0.0.13-alpha.0" + chalk "^4.1.0" + "@lerna/add@3.21.0": version "3.21.0" resolved "https://registry.npmjs.org/@lerna/add/-/add-3.21.0.tgz#27007bde71cc7b0a2969ab3c2f0ae41578b4577b" @@ -3344,7 +3367,7 @@ cli-cursor@^3.1.0: dependencies: restore-cursor "^3.1.0" -cli-spinners@^2.0.0: +cli-spinners@^2.0.0, cli-spinners@^2.2.0: version "2.5.0" resolved "https://registry.npmjs.org/cli-spinners/-/cli-spinners-2.5.0.tgz#12763e47251bf951cb75c201dfa58ff1bcb2d047" integrity sha512-PC+AmIuK04E6aeSs/pUccSujsTzBhu4HzC2dL+CfJB/Jcc2qTRbEwZQDfIUpt2Xl8BodYBEq8w4fc0kU2I9DjQ== @@ -7765,7 +7788,7 @@ mute-stream@0.0.7: resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" integrity sha1-MHXOk7whuPq0PhvE2n6BFe0ee6s= -mute-stream@0.0.8, mute-stream@~0.0.4: +mute-stream@0.0.8, mute-stream@^0.0.8, mute-stream@~0.0.4: version "0.0.8" resolved "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" integrity sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA== @@ -10146,7 +10169,7 @@ rimraf@~2.2.0: resolved "https://registry.npmjs.org/rimraf/-/rimraf-2.2.8.tgz#e439be2aaee327321952730f99a8929e4fc50582" integrity sha1-5Dm+Kq7jJzIZUnMPmaiSnk/FBYI= -run-async@^2.2.0, run-async@^2.4.0: +run-async@^2.2.0, run-async@^2.3.0, run-async@^2.4.0: version "2.4.1" resolved "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz#8440eccf99ea3e70bd409d49aab88e10c189a455" integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==