mirror of
https://github.com/djdevin/recflare.git
synced 2026-09-08 14:41:28 -07:00
22 lines
636 B
TypeScript
22 lines
636 B
TypeScript
import { $ } from 'zx'
|
|
|
|
import { catchError, onProcSuccess } from '../helpers/proc'
|
|
|
|
import type { PlopTypes } from '@turbo/gen'
|
|
import type { Answers } from '../answers'
|
|
|
|
export type PnpmInstallData = Answers & { destination: string }
|
|
|
|
export function pnpmInstall(data: PnpmInstallData, _config: any, _plop: PlopTypes.NodePlopAPI) {
|
|
return new Promise((resolve, reject) => {
|
|
console.log('🌀 running pnpm install')
|
|
|
|
$({
|
|
cwd: data.turbo.paths.root,
|
|
nothrow: true,
|
|
})`pnpm install --child-concurrency=10 -F ./${data.destination}`
|
|
.then(onProcSuccess('pnpm install', resolve, reject))
|
|
.catch(catchError(reject))
|
|
})
|
|
}
|