UNPKG

jok

Version:

Bundle of utility functions for code generation related to nodejs and graphql

19 lines (18 loc) 362 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var execa = require("execa"); var cmd; function getInstallCmd() { if (cmd) { return cmd; } try { execa.shellSync('yarnpkg --version'); cmd = 'yarn'; } catch (e) { cmd = 'npm'; } return cmd; } exports.default = getInstallCmd;