UNPKG

@bincode/jekpack

Version:

[![npm version](https://badge.fury.io/js/%40bincode%2Fjekpack.svg)](https://badge.fury.io/js/%40bincode%2Fjekpack) [![Build Status](https://travis-ci.org/yfxie/jekpack.svg?branch=master)](https://travis-ci.org/yfxie/jekpack) [![codecov](https://codecov.io

19 lines (16 loc) 354 B
const execa = require('execa'); module.exports = dir => { let hasYarn; try { execa('yarn --version', [], { stdio: 'ignore' }); hasYarn = true; } catch (e) { hasYarn = false; } const command = hasYarn ? 'yarn' : 'npm'; const args = hasYarn ? [] : ['install']; execa(command, args, { cwd: dir, stdio: 'inherit' }); };