|
| 1 | +import * as envinfo from 'envinfo' |
| 2 | +import { ora } from '@vuepress/utils' |
| 3 | + |
| 4 | +export const info = async (): Promise<void> => { |
| 5 | + const spinner = ora() |
| 6 | + spinner.start('Collecting Environment Info') |
| 7 | + |
| 8 | + const result = await envinfo.run( |
| 9 | + { |
| 10 | + System: ['OS', 'CPU', 'Memory', 'Shell'], |
| 11 | + Binaries: ['Node', 'Yarn', 'npm'], |
| 12 | + Utilities: ['Git'], |
| 13 | + Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'], |
| 14 | + npmPackages: [ |
| 15 | + '@vuepress/bundler-webpack', |
| 16 | + '@vuepress/cli', |
| 17 | + '@vuepress/client', |
| 18 | + '@vuepress/core', |
| 19 | + '@vuepress/markdown', |
| 20 | + '@vuepress/plugin-active-header-links', |
| 21 | + '@vuepress/plugin-back-to-top', |
| 22 | + '@vuepress/plugin-container', |
| 23 | + '@vuepress/plugin-debug', |
| 24 | + '@vuepress/plugin-docsearch', |
| 25 | + '@vuepress/plugin-git', |
| 26 | + '@vuepress/plugin-google-analytics', |
| 27 | + '@vuepress/plugin-medium-zoom', |
| 28 | + '@vuepress/plugin-nprogress', |
| 29 | + '@vuepress/plugin-palette-stylus', |
| 30 | + '@vuepress/plugin-pwa', |
| 31 | + '@vuepress/plugin-pwa-popup', |
| 32 | + '@vuepress/shared', |
| 33 | + '@vuepress/theme-default', |
| 34 | + '@vuepress/theme-vue', |
| 35 | + '@vuepress/utils', |
| 36 | + 'vuepress', |
| 37 | + ], |
| 38 | + }, |
| 39 | + { |
| 40 | + showNotFound: true, |
| 41 | + duplicates: true, |
| 42 | + fullTree: true, |
| 43 | + } |
| 44 | + ) |
| 45 | + spinner.stop() |
| 46 | + |
| 47 | + console.info(result) |
| 48 | +} |
0 commit comments