UNPKG

glass-app-manager

Version:

Informatica's Glass Framework CLI for bootstrapping

27 lines (21 loc) 735 B
const execa = require("execa"); const pEachSeries = require("p-each-series"); const ora = require("ora"); const chalk = require("chalk"); module.exports = async (opts) => { const { dest, info } = opts; const commands = [ { cmd: `${info.manager} install`, cwd: dest } ]; const promise = pEachSeries(commands, async ({ cmd, cwd }) => { return execa.shell(cmd, { cwd }); }); ora.promise(promise, `Running ${info.manager} install`); console.log(`Executing ${chalk.cyan(`${info.manager} install`)}`); console.log(`if this fails, check README.md file. Maybe you're missing .npmrc file`); await promise; return promise; };