How to use default-shell - 2 common examples

To help you get started, we’ve selected a few default-shell 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 patternplate / patternplate / source / library / init / index.js View on Github external
// Write pattern readme
	await sander.writeFile(readmeTarget, readmeData);

	// Be nice and instructional
	spinner.text = ` Initialized project ${data.name} at ${cwd}`;
	spinner.succeed();

	const instructions = [
		process.cwd() !== cwd && `cd ${directory}`,
		'npm install',
		data.scripts.start === 'patternplate' ?
			'npm start -- --open' : './node_modules/.bin/patternplate start --open'
	].filter(Boolean);

	const sep = defaultShell.includes('fish') ? '; and ' : ' && ';
	console.log(`🚀  Start and open patternplate:`);
	console.log(`\n   ${instructions.join(sep)}`);
}
github patternplate / patternplate / packages / cli / source / library / init / index.js View on Github external
// Write pattern readme
  await sander.writeFile(readmeTarget, readmeData);

  // Be nice and instructional
  spinner.text = ` Initialized project ${data.name} at ${cwd}`;
  spinner.succeed();

  const instructions = [
    process.cwd() !== cwd && `cd ${directory}`,
    "npm install",
    data.scripts.start === "patternplate"
      ? "npm start -- --open"
      : "./node_modules/.bin/patternplate start --open"
  ].filter(Boolean);

  const sep = defaultShell.includes("fish") ? "; and " : " && ";
  console.log(`🚀  Start and open patternplate:`);
  console.log(`\n   ${instructions.join(sep)}`);
}

default-shell

Get the user's default shell

MIT
Latest version published 3 years ago

Package Health Score

50 / 100
Full package analysis

Popular default-shell functions