/
githubmirror
/
vuetify
Обзор
Документация
Войти
/
githubmirror
/
vuetify
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
scripts/warn-npm-install.js
19 строк
673 B
Joaquín Sánchez
chore: move repo to ESM (#21105)
19 мар 2025, 09:34
Не верифицирован
19 мар 2025, 09:34
d822282
Код
Авторство
О чём код?
import fs from 'node:fs' const reset = '\x1b[0m' const red = '\x1b[31m' const bright = '\x1b[1m' const yarn = fs.existsSync('yarn.lock') const npm = fs.existsSync('package-lock.json') if (yarn || npm) { const name = yarn ? 'yarn' : 'npm' const lock = yarn ? 'yarn.lock' : 'package-lock.json' console.log() console.log(`${red}WARNING:${reset}`) console.log(`This project uses ${bright}pnpm${reset}. Installing its dependencies with ${bright}${name}${reset} may result in errors`) console.log(`Please remove ${bright}${lock}${reset} and try again, with pnpm this time`) console.log(`See ${bright}https://pnpm.io/${reset}`) console.log() process.exit(1) }