/
githubmirror
/
yarn
Обзор
Документация
Войти
/
githubmirror
/
yarn
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/util/package-name-utils.js
13 строк
558 B
Konstantin Raev
Ability to store a built package in offline mirror (#5314)
22 фев 2018, 21:07
Не верифицирован
22 фев 2018, 21:07
eab88b8
Код
Авторство
О чём код?
/* @flow */ export function getPlatformSpecificPackageFilename(pkg: {name: string, version: string}): string { // TODO support hash for all subdependencies that have installs scripts const normalizeScope = name => (name[0] === '@' ? name.substr(1).replace('/', '-') : name); const suffix = getSystemParams(); return `${normalizeScope(pkg.name)}-v${pkg.version}-${suffix}`; } export function getSystemParams(): string { // TODO support platform variant for linux return `${process.platform}-${process.arch}-${process.versions.modules || ''}`; }