15 lines
369 B
JavaScript
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');
|
|
}
|