0.4.1 • Published 12 months ago

prettier-plugin-dot v0.4.1

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

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 💫

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):

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.

0.4.1

12 months ago

0.4.0

1 year ago

0.3.1

3 years ago

0.3.0

3 years ago

0.2.0

3 years ago

0.1.2

3 years ago

0.1.1

3 years ago

0.1.0

3 years ago