node-tidy
Version:
A CLI tool to find and remove unused NPM packages and Install Missing packages in your Node.js projects.
14 lines (13 loc) • 412 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
const child_process_1 = require("child_process");
function execCommand(command) {
try {
return (0, child_process_1.execSync)(command, { encoding: "utf8" }).trim();
}
catch (err) {
console.error(`Error executing command: ${command}`, err.message);
return null;
}
}
exports.default = execCommand;