New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

diagrams

Package Overview
Dependencies
Maintainers
1
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diagrams

Generate Flowcharts, Network Sequence Diagrams, and Railroad Diagrams

  • 0.2.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
22
increased by46.67%
Maintainers
1
Weekly downloads
 
Created
Source

Overview

It's a work in progress. See TODO.md.

The goal of this project is to enable easily generating static SVG and images for useful diagrams related to documenting/explaining complex systems.

My current use case is for embedding these images into Github Markdown based documents.

Installation

npm install -g diagrams

Usage

Railroad Diagrams

  1. Run the following command from your terminal

     diagrams railroad inputTextFile example.svg
    
  2. If your inputTextFile's content was this:

     Diagram(
       Optional('+', 'skip'),
         Choice(0,
           NonTerminal('name-start char'),
           NonTerminal('escape')),
           ZeroOrMore(
             Choice(0,
               NonTerminal('name char'),
               NonTerminal('escape'))))
    
  3. ...then your example.svg should look like this:

  1. For more Documentation see railroad-diagrams's documentation': - NOTE: There is no real documentation for the input file syntax (PRs welcome), but the examples should help you figure it out a bit - Examples - Online Generator

Tips & Tricks

Embedding SVGs into Github Markdown

If you host your SVG file somewhere like using Github Pages, you can embed svg diagrams into your markdown files using the following style syntax:

<img src="http://francoislaberge.github.io/diagrams/docs/example.svg">

Credits

Keywords

FAQs

Package last updated on 09 Oct 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc