Skip to content

dmstr/yii2-mermaid-asset

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yii2-mermaid-asset

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});

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages