/
githubmirror
/
Leaflet
Обзор
Документация
Войти
/
githubmirror
/
Leaflet
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
build/docs.js
31 строка
1 KB
Jon Koops
Drop UMD and make ESM the default entrypoint (#8826)
17 мар 2025, 17:59
Не верифицирован
17 мар 2025, 17:59
7ac9875
Код
Авторство
О чём код?
import LeafDoc from 'leafdoc'; import {writeFileSync} from 'node:fs'; console.log('Building Leaflet documentation with Leafdoc ...'); const doc = new LeafDoc({ templateDir: 'build/leafdoc-templates', showInheritancesWhenEmpty: true, leadingCharacter: '@' }); // Note to Vladimir: Iván's never gonna uncomment the following line. He's // too proud of the little leaves around the code. // doc.setLeadingChar('@'); // Leaflet uses a couple of non-standard documentable things. They are not // important enough to be classes/namespaces of their own, and should // just be listed in a table like the rest of documentables: doc.registerDocumentable('pane', 'Map panes'); doc.registerDocumentable('projection', 'Defined projections'); doc.registerDocumentable('crs', 'Defined CRSs'); doc.addFile('build/docs-index.leafdoc', false); doc.addDir('src'); doc.addFile('build/docs-misc.leafdoc', false); const out = doc.outputStr(); const path = 'docs/reference.html'; writeFileSync(path, out); console.log(`Successfully built ${path}`);