Files
lab1/exam/common.js
2026-02-19 15:05:20 +01:00

15 lines
369 B
JavaScript

import fs from 'fs';
import { execSync } from 'child_process';
export function installDeps() {
// check if node_modules exists
if (fs.existsSync('./node_modules')) {
return;
}
// install dependencies
console.log('Installing dependencies...');
execSync('npm install', { stdio: 'inherit' });
console.log('Dependencies installed');
}