/
githubmirror
/
hexo
Обзор
Документация
Войти
/
githubmirror
/
hexo
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
lib/theme/processors/view.ts
23 строки
464 B
D-Sketon
refactor: refactor types (#5344)
18 янв 2024, 07:59
Не верифицирован
18 янв 2024, 07:59
86350d9
Код
Авторство
О чём код?
import { Pattern } from 'hexo-util'; import type { _File } from '../../box'; import type Theme from '..'; function process(file: _File): Promise<void> { const { path } = file.params; if (file.type === 'delete') { (file.box as Theme).removeView(path); return; } return file.read().then(result => { (file.box as Theme).setView(path, result); }); } const pattern = new Pattern('layout/*path'); export const view = { pattern, process };