@cotherapist/unified-report
v0.1.0
Published
Stimulus renderer for Cotherapist v1_unified_report sections
Downloads
68
Maintainers
Readme
@cotherapist/unified-report
Stimulus + ESM renderer for v1_unified_report sections (shared by public-testing and monolith).
Установка
npm install @cotherapist/unified-report @hotwired/stimulus@hotwired/stimulus — peer dependency (>= 3.2).
Использование
import { Application } from "@hotwired/stimulus"
import { UnifiedReportController } from "@cotherapist/unified-report"
import "@cotherapist/unified-report/styles.css"
const app = Application.start()
app.register("unified-report", UnifiedReportController)<div data-controller="unified-report"
data-unified-report-locale-value="ru"
data-unified-report-report-value='{"schema":"v1_unified_report","sections":[]}'>
<div data-unified-report-target="mount"></div>
</div>Имя data-атрибута не должно содержать url / src / href (иначе Go html/template и некоторые HTML-санитайзеры экранируют значение).
Разработка
npm ci
npm testТребуется Node.js >= 18 (встроенный node:test).
Публикация
Подробная пошаговая инструкция: PUBLISHING.md (npm org, GitHub Secrets, первый и последующие релизы).
Кратко:
- Репозиторий: github.com/cotherapist-ru/unified-report
- Секрет
NPM_TOKENв GitHub Actions (Automation token org@cotherapist) - GitHub Release с тегом
vX.Y.Z=versionвpackage.json→ workflow Publish публикует в npm
Лицензия
MIT — см. LICENSE.
