mirror of
https://github.com/verdaccio/verdaccio.git
synced 2024-12-30 22:34:10 -05:00
17 lines
469 B
TypeScript
17 lines
469 B
TypeScript
|
import { join } from 'path';
|
||
|
|
||
|
import { exec } from '@verdaccio/test-cli-commons';
|
||
|
|
||
|
export function getCommand(projectFolder) {
|
||
|
return join(projectFolder, './.yarn/releases/yarn.js');
|
||
|
}
|
||
|
|
||
|
export function getYarnCommand() {
|
||
|
// FUTURE: yarn 4 rc still not available via registry
|
||
|
return join(__dirname, './bin/yarn-4.0.0-rc.14.cjs');
|
||
|
}
|
||
|
|
||
|
export function yarn(projectFolder, ...args: string[]) {
|
||
|
return exec({ cwd: projectFolder }, getCommand(projectFolder), args);
|
||
|
}
|