UNPKG

ajv-cli

Version:

Command line interface for Ajv JSON schema validator

11 lines (9 loc) 314 B
import {exec, ExecException} from "child_process" import * as path from "path" const cwd = path.join(__dirname, "..") export default function cli( params: string, callback?: (error: ExecException | null, stdout: string, stderr: string) => void ): void { exec(`node dist/index ${params}`, {cwd}, callback) }