UNPKG

create-electron-foundation

Version:

An interactive CLI to bootstrap a modern, type-safe, and scalable Electron application.

18 lines (17 loc) 777 B
// TERMINAL import chalk from 'chalk'; import ora from 'ora'; export const installPackages = (options) => { /** * Runs the dedicated installer for all the inUse packages * Updates the package.json with the new dependencies - it does NOT "npm i" * ####################################################################### */ const { packages } = options; for (const [name, pkgOpts] of Object.entries(packages)) { if (pkgOpts.inUse) { const spinner = ora(`${chalk.blue(options.project_name)} ${chalk.bold(`Handling: ${name}`)}...`).start(); pkgOpts.installer(options); spinner.succeed(`${chalk.blue(options.project_name)} ${chalk.green(`setup boilerplate`)} for ${chalk.bold.green(name)}`); } } };