/
githubmirror
/
trpc
Обзор
Документация
Войти
/
githubmirror
/
trpc
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
www/src/components/CompaniesUsing.script.ts
27 строк
562 B
Alex / KATT
chore: move company logos (#5390)
25 янв 2024, 17:29
Не верифицирован
25 янв 2024, 17:29
0799cc4
Код
Авторство
О чём код?
import fs from 'fs'; import path from 'path'; const WWW_ROOT = path.join(__dirname, '../../'); const files = fs.readdirSync(path.join(WWW_ROOT, 'static/logos')).sort(); const companies = files.map((src) => { const ext = path.extname(src); const name = src.substring(0, src.length - ext.length); return { src: `/logos/${src}`, name, }; }); fs.writeFileSync( __dirname + '/CompaniesUsing.script.output.ts', ` // prettier-ignore // eslint-disable export const companies = ${JSON.stringify(companies, null, 2)} as const; `.trimStart(), );