dmstr/yii2-mermaid-asset
Mermaid asset bundle for Yii 2.0 Framework
Maintainers
2.0.0
2025-12-16 14:21 UTC
Requires
- yiisoft/yii2: ^2.0
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
BSD-3-Clause d03778d069c6a918cb9694fd52ef1be1a07b54c5
- Tobias Munk <tobias.woop@diemeisterei.de>
This package is auto-updated.
Last update: 2026-06-16 15:49:14 UTC
README
Mermaid asset bundle for Yii 2.0 Framework.
Installation
composer require dmstr/yii2-mermaid-asset
NPM Asset Installation
This package requires the mermaid npm package. The npm asset must be installed manually or via foxy.
Manual installation:
npm install mermaid@^11.0.0
Via foxy: The package.json in this package defines the required npm dependency and will be automatically installed when using foxy.
Configuration
The asset bundle expects mermaid to be available at @npm/mermaid/dist/. Make sure the @npm alias points to your node_modules directory:
Yii::setAlias('@npm', '@app/node_modules');
Usage
Register the asset bundle in your view:
\dmstr\web\MermaidAsset::register($this);
Then initialize mermaid in your JavaScript:
mermaid.initialize({startOnLoad: true});
