UNPKG

f2elint

Version:

Linter for Alibaba F2E Guidelines

18 lines (17 loc) 437 B
import { spawn } from 'child_process'; export async function runCommand(projectPath, command) { await new Promise((resolve, reject) => { const child = spawn(command, { cwd: projectPath, shell: true, }); child.on('close', (code) => { if (code === 0) { resolve(); } else { reject(); } }); }); }