Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function cleanSync () {
// wipe the existing node_modules folder so we can have a clean start
rimraf.sync(path.join(process.cwd(), "node_modules"));
spawn.sync("npm", ["cache", "clean"], {stdio: "inherit"});
}
function invokeJustAPI (args) {
args = [path.join(__dirname, '..', '..', 'bin', 'just-api')].concat(args);
return spawn.sync(process.execPath, args, { cwd: path.resolve('./test/cli/src') });
}
function handleRun(args) {
console.log(Chalk.bold(`Running Emulator on ${args.executable} located in ${args.path}`));
spawn.sync('npm', ['start'], {
stdio: 'inherit',
cwd: path.resolve(__dirname, '../../'),
env: Object.assign(process.env, {
'BUILD_PATH': args.path,
'WINEXE_NAME': args.executable,
'OSXEXE_NAME': args.executable
}),
});
}
function install () {
if (which("yarn") !== null) {
spawn.sync("yarn", {stdio: "inherit"});
}
const postFix = IS_WINDOWS ? ".cmd" : "";
spawn.sync("npm" + postFix, ["install"], {stdio: "inherit"});
}
function install () {
if (which("yarn") !== null) {
spawn.sync("yarn", {stdio: "inherit"});
}
const postFix = IS_WINDOWS ? ".cmd" : "";
spawn.sync("npm" + postFix, ["install"], {stdio: "inherit"});
}
#!/usr/bin/env node
const spawn = require('cross-spawn').spawn;
const fs = require('fs');
const version = JSON.parse(fs.readFileSync('./package.json')).version;
const tag = `truecar/gluestick:${version}`;
spawn.sync('docker', ['build', '-f', './docker/Dockerfile', '--force-rm=true', '-t', tag, '--build-arg', `GLUESTICK_VERSION=${version}`, '.'], { stdio: 'inherit', env: Object.assign({}, process.env) });
spawn.sync('docker', ['push', tag], { stdio: 'inherit', env: Object.assign({}, process.env) });