Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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}`;
}
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}`;
}
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}`;
}
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;
}