Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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.`
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.`
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);
}
.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);
});
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);
}
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);
}
.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)))
})
})
.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)
})
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);
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);
}
};