/
githubmirror
/
obsidian-clipper
Обзор
Документация
Войти
/
githubmirror
/
obsidian-clipper
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
scripts/set-defuddle-dev.js
21 строка
729 B
Steph Ango
change build process for defuddle
12 мар 2025, 22:56
12 мар 2025, 22:56
d8a46f6
Код
Авторство
О чём код?
const fs = require('fs'); const path = require('path'); // Read the package.json const packageJsonPath = path.join(__dirname, '..', 'package.json'); const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); // Update the defuddle dependency to use local version packageJson.dependencies.defuddle = 'file:../defuddle'; // Write the updated package.json fs.writeFileSync(packageJsonPath, JSON.stringify(packageJson, null, '\t') + '\n'); // Run npm install to update the dependency const { execSync } = require('child_process'); try { execSync('npm install', { stdio: 'inherit', cwd: path.join(__dirname, '..') }); } catch (error) { console.error('Failed to install dependencies:', error); process.exit(1); }