Socket
Book a DemoInstallSign in
Socket

prettier-plugin-dot

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prettier-plugin-dot

A prettier plugin for Graphviz Dot.

latest
Source
npmnpm
Version
0.4.1
Version published
Maintainers
1
Created
Source

NodeCI npm version License: MIT PRs Welcome tested with jest code style: prettier All Contributors

Prettier for Graphviz Dot

prettier-plugin-dot is a prettier plugin for Graphviz Dot.

Format your Dot using Prettier.

How it works? 🤔

A Prettier plugin must first parse the source code of the target language into a traversable data structure (Usually an Abstract Syntax Tree) and then print out that data structure in a "pretty" style.

The Graphviz Dot AST generated by ts-graphviz implemented in JavaScript using the peggy. What this means is that unlike many other prettier plugins, prettier-plugin-dot has no additional runtime pre-requisites (e.g: Python executable). It could even be used inside a browser.

Getting started ✨

If you're using the npm or yarn CLI, then add the plugin by:

NPM

# yarn
$ yarn add -D prettier prettier-plugin-dot
# or npm
$ npm install --save-dev prettier prettier-plugin-dot

The prettier executable is now installed and ready for use:

$ yarn run prettier --write '**/*.dot'
# or
$ npx prettier --write '**/*.dot'

Example 📑

Input ⬅️

digraph G {Hello->World}

Output ➡️

digraph G {
  Hello -> World;
}

Related projects can be found at ts-graphviz GitHub Organization.

The TypeScript/JavaScript ecosystem provides a variety of OSS with the goal of making Graphviz more connected and easier to use.

Contributors 👥

Thanks goes to these wonderful people (emoji key):

⚖️

Yuki Yamazaki

📖 ⚠️ 💻

Chris Wilkinson

🐛

Irakli Safareli

🤔

This project follows the all-contributors specification. Contributions of any kind welcome!

How to Contribute 💪

The easiest way to contribute is to use the library and star repository.

Questions 💭

Feel free to ask questions on GitHub Discussions.

Report bugs / request additional features 💡

Please register at GitHub Issues.

Development / Bug Fixes 🧑‍💻

See CONTRIBUTING.md.

Financial Support 💸

Please support core member kamiazya.

Note Even just a dollar is enough motivation for me to develop 😊

License ⚖️

This software is released under the MIT License, see LICENSE.

Keywords

prettier

FAQs

Package last updated on 05 May 2023

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