@barqdb/tools
v1.0.1
Published
Tools useful for working with Barqs
Readme
Tools for Barq
Introduction
This package contains various tools for working with Barq files. Each tool is briefly documented here.
Installation
The prerequisite for installing the @barqdb/tools package is a working node.js and a package manager.
npm:
npm install -g @barqdb/toolsyarn:
yarn global add @barqdb/toolsBuilding
Source code for all tools are found in src. The output of the build process is found in dist.
npm install
npm run buildYou can run the transpiled tools directly e.g.,
node dist/barq-schema.js -hbarq-schema
The barq-schema can read a local Barq file and export the schema. The support output formats are:
- JSON
- Mermaid compatible class diagram
Example:
npx barq-schema -i samples/default.barq -o MyClasses.mmd -f mermaidThe output will look like
classDiagram
class Child {
+string name
+int age
}
class Parent {
+string name
+string city
+Parent marriedTo
+list~Child~ children
}
Parent <-- Parent
Child <-- ParentIf you plan to use the JSON output, it is recommended to use it with jq.
