MCPcopy Create free account
hub / github.com/vercel/hyper / getInstallCommands

Method getInstallCommands

bin/yarn-standalone.js:102691–102718  ·  view source on GitHub ↗
(pkg)

Source from the content-addressed store, hash-verified

102689 }
102690
102691 getInstallCommands(pkg) {
102692 const scripts = pkg.scripts;
102693 if (scripts) {
102694 const cmds = [];
102695 for (var _iterator = INSTALL_STAGES, _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
102696 var _ref;
102697
102698 if (_isArray) {
102699 if (_i >= _iterator.length) break;
102700 _ref = _iterator[_i++];
102701 } else {
102702 _i = _iterator.next();
102703 if (_i.done) break;
102704 _ref = _i.value;
102705 }
102706
102707 const stage = _ref;
102708
102709 const cmd = scripts[stage];
102710 if (cmd) {
102711 cmds.push([stage, cmd]);
102712 }
102713 }
102714 return cmds;
102715 } else {
102716 return [];
102717 }
102718 }
102719
102720 walk(loc) {
102721 var _this = this;

Callers 2

packageCanBeInstalledMethod · 0.95
runCommandMethod · 0.80

Calls 2

nextMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected