How to use envinfo - 10 common examples

To help you get started, weโ€™ve selected a few envinfo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github OffGridNetworks / fuse-box-create-react-app / packages / fuse-box-create-react-app / createReactApp.js View on Github external
console.log();
    console.log(
      `    If you have any problems, do not hesitate to file an issue:`
    );
    console.log(
      `      ${chalk.cyan(
        'https://github.com/offgridnetworks/fuse-box-create-react-app/issues/new'
      )}`
    );
    console.log();
  })
  .parse(process.argv);

if (typeof projectName === 'undefined') {
  if (program.info) {
    envinfo.print({
      packages: ['react', 'react-dom', 'fuse-box-react-scripts'],
      noNativeIDE: true,
      duplicates: true,
    });
    process.exit(0);
  }
  console.error('Please specify the project directory:');
  console.log(
    `  ${chalk.cyan(program.name())} ${chalk.green('')}`
  );
  console.log();
  console.log('For example:');
  console.log(`  ${chalk.cyan(program.name())} ${chalk.green('my-react-app')}`);
  console.log();
  console.log(
    `Run ${chalk.cyan(`${program.name()} --help`)} to see all options.`
github humanmade / react-wp-scripts / packages / create-react-wp-project / index.js View on Github external
console.log();
			console.log(
				`    If you have any problems, do not hesitate to file an issue:`
			);
			console.log(
				`      ${chalk.cyan(
					'https://github.com/humanmade/react-wp-scripts/issues/new'
				)}`
			);
			console.log();
		} )
		.parse( process.argv );

	if ( typeof projectName === 'undefined' ) {
		if (program.info) {
			envinfo.print( {
				packages:    ['react', 'react-dom', 'react-wp-scripts'],
				noNativeIDE: true,
				duplicates:  true,
			} );
			process.exit( 0 );
		}
		console.error( 'Please specify the project directory:' );
		console.log(
			`  ${chalk.cyan(program.name())} ${chalk.green('')}`
		);
		console.log();
		console.log( 'For example:' );
		console.log( `  ${chalk.cyan(program.name())} ${chalk.green('my-react-app')}` );
		console.log();
		console.log(
			`Run ${chalk.cyan(`${program.name()} --help`)} to see all options.`
github naviapps / create-nw-react-app / packages / create-nw-react-app / createNwReactApp.js View on Github external
console.log();
    console.log(
      `    If you have any problems, do not hesitate to file an issue:`
    );
    console.log(
      `      ${chalk.cyan(
        'https://github.com/naviapps/create-nw-react-app/issues/new'
      )}`
    );
    console.log();
  })
  .parse(process.argv);

if (program.info) {
  console.log(chalk.bold('\nEnvironment Info:'));
  return envinfo
    .run(
      {
        System: ['OS', 'CPU'],
        Binaries: ['Node', 'npm', 'Yarn'],
        Browsers: ['Chrome', 'Edge', 'Internet Explorer', 'Firefox', 'Safari'],
        npmPackages: ['react', 'react-dom', 'nw-react-scripts'],
        npmGlobalPackages: ['create-nw-react-app'],
      },
      {
        duplicates: true,
        showNotFound: true,
      }
    )
    .then(console.log);
}
github preactjs / preact-cli / packages / cli / lib / index.js View on Github external
.action(() => {
		console.log();
		console.log('Environment Info:');
		envinfo
			.run({
				System: ['OS', 'CPU'],
				Binaries: ['Node', 'Yarn', 'npm'],
				Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'],
				npmPackages: [
					'preact',
					'preact-compat',
					'preact-cli',
					'preact-router',
					'preact-render-to-string',
				],
				npmGlobalPackages: ['preact-cli'],
			})
			.then(console.log);
	});
github facebook / create-react-app / packages / create-react-app / createReactApp.js View on Github external
console.log(
      `      ${chalk.cyan(
        'https://github.com/facebook/create-react-app/issues/new'
      )}`
    );
    console.log();
  })
  .parse(process.argv);

if (program.info) {
  console.log(chalk.bold('\nEnvironment Info:'));
  console.log(
    `\n  current version of ${packageJson.name}: ${packageJson.version}`
  );
  console.log(`  running from ${__dirname}`);
  return envinfo
    .run(
      {
        System: ['OS', 'CPU'],
        Binaries: ['Node', 'npm', 'Yarn'],
        Browsers: ['Chrome', 'Edge', 'Internet Explorer', 'Firefox', 'Safari'],
        npmPackages: ['react', 'react-dom', 'react-scripts'],
        npmGlobalPackages: ['create-react-app'],
      },
      {
        duplicates: true,
        showNotFound: true,
      }
    )
    .then(console.log);
}
github frontarm / navi / packages / create-react-navi-app / createReactNaviApp.js View on Github external
console.log();
    console.log(
      `    If you have any problems, do not hesitate to file an issue:`
    );
    console.log(
      `      ${chalk.cyan(
        'https://github.com/frontarm/navi/issues/new'
      )}`
    );
    console.log();
  })
  .parse(process.argv);

if (program.info) {
  console.log(chalk.bold('\nEnvironment Info:'));
  return envinfo
    .run(
      {
        System: ['OS', 'CPU'],
        Binaries: ['Node', 'npm', 'Yarn'],
        Browsers: ['Chrome', 'Edge', 'Internet Explorer', 'Firefox', 'Safari'],
        npmPackages: ['react', 'react-dom', 'react-scripts-mdx'],
        npmGlobalPackages: ['create-react-navi-app'],
      },
      {
        clipboard: false,
        duplicates: true,
        showNotFound: true,
      }
    )
    .then(console.log);
}
github luoxue-victor / webpack-box / packages / cli / command.config.js View on Github external
.action(() => {
        console.log(chalk.cyanBright('\n ๆญฃๅœจๆœๆฃ€็Žฏๅขƒไฟกๆฏ:'))
        require('envinfo').run(
          {
            System: ['OS', 'CPU'],
            Binaries: ['Node', 'Yarn', 'npm'],
            Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'],
            npmPackages: '/**/{*webpack*,*babel*,**typescript**,*pkb*}',
            npmGlobalPackages: ['@pkb/cli']
          },
          {
            showNotFound: true,
            duplicates: true,
            fullTree: true
          }
        ).then(info => console.log(chalk.greenBright(info)))
      })
  })
github KuangPF / vue-cli-analysis / packages / @vue / cli / bin / vue.js View on Github external
.action((cmd) => {
    console.log(chalk.bold('\nEnvironment Info:'))
    require('envinfo').run(
      {
        System: ['OS', 'CPU'],
        Binaries: ['Node', 'Yarn', 'npm'],
        Browsers: ['Chrome', 'Edge', 'Firefox', 'Safari'],
        npmPackages: '/**/{*vue*,@vue/*/}',
        npmGlobalPackages: ['@vue/cli']
      },
      {
        showNotFound: true,
        duplicates: true,
        fullTree: true
      }
    ).then(console.log)
  })
github frontity / frontity / packages / frontity / src / actions / info.ts View on Github external
export default async () => {
  const info = await envinfo.run(
    {
      System: ["OS", "CPU", "Memory", "Shell"],
      Binaries: ["Node", "npm"],
      Browsers: ["Chrome", "Edge", "Internet Explorer", "Firefox", "Safari"],
      npmPackages: true,
      npmGlobalPackages: ["frontity", "npx"]
    },
    { markdown: true, showNotFound: true, duplicates: true }
  );
  console.log(`${info}
  
  System info copied in the clipboard!
  You can now paste it in the Frontity Community or GitHub issue.
  
  `);
  writeSync(info);
github react-native-community / cli / packages / cli / src / commands / info / info.ts View on Github external
const info = async function getInfo(_argv: Array, ctx: Config) {
  try {
    logger.info('Fetching system and libraries information...');
    const output = await envinfo.run({
      System: ['OS', 'CPU', 'Memory', 'Shell'],
      Binaries: ['Node', 'Yarn', 'npm', 'Watchman'],
      IDEs: ['Xcode', 'Android Studio'],
      SDKs: ['iOS SDK', 'Android SDK'],
      npmPackages: ['react', 'react-native', '@react-native-community/cli'],
      npmGlobalPackages: '*react-native*',
    });
    logger.log(output.trim());
  } catch (err) {
    logger.error(`Unable to print environment info.\n${err}`);
  } finally {
    await releaseChecker(ctx.root);
  }
};

envinfo

Info about your dev environment for debugging purposes

MIT
Latest version published 3 months ago

Package Health Score

83 / 100
Full package analysis

Popular envinfo functions