How to use the @loki/core.dependencyAvailable function in @loki/core

To help you get started, we’ve selected a few @loki/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github oblador / loki / packages / runner / src / build-command.js View on Github external
function buildCommand(command, argObject) {
  const args = argObjectToString(argObject);
  if (dependencyAvailable('loki')) {
    return `loki ${command} ${args}`;
  }
  if (dependencyAvailable('yarn')) {
    return `yarn loki ${command} -- ${args}`;
  }
  if (dependencyAvailable('npm')) {
    return `npm run loki ${command} -- ${args}`;
  }
  return `./node_modules/.bin/loki ${command} ${args}`;
}
github oblador / loki / packages / runner / src / build-command.js View on Github external
function buildCommand(command, argObject) {
  const args = argObjectToString(argObject);
  if (dependencyAvailable('loki')) {
    return `loki ${command} ${args}`;
  }
  if (dependencyAvailable('yarn')) {
    return `yarn loki ${command} -- ${args}`;
  }
  if (dependencyAvailable('npm')) {
    return `npm run loki ${command} -- ${args}`;
  }
  return `./node_modules/.bin/loki ${command} ${args}`;
}
github oblador / loki / packages / runner / src / build-command.js View on Github external
function buildCommand(command, argObject) {
  const args = argObjectToString(argObject);
  if (dependencyAvailable('loki')) {
    return `loki ${command} ${args}`;
  }
  if (dependencyAvailable('yarn')) {
    return `yarn loki ${command} -- ${args}`;
  }
  if (dependencyAvailable('npm')) {
    return `npm run loki ${command} -- ${args}`;
  }
  return `./node_modules/.bin/loki ${command} ${args}`;
}
github oblador / loki / packages / runner / src / config / get-defaults.js View on Github external
function getDefaults() {
  if (isReactNativeProject()) {
    return require('./defaults-react-native.json');
  }
  const defaults = require('./defaults-react.json');
  if (dependencyAvailable('docker')) {
    return Object.assign({}, defaults, {
      configurations: mapChromeAppToDocker(defaults.configurations),
    });
  }
  return defaults;
}