2019-07-10 15:07:32 +02:00
2019-07-10 15:07:32 +02:00
2019-07-10 15:07:32 +02:00
2019-07-10 15:07:32 +02:00
2019-07-10 11:03:26 +02:00
2019-07-10 15:07:32 +02:00
2019-07-09 18:24:06 +02:00
2019-07-09 18:24:06 +02:00
2019-07-10 15:07:32 +02:00
2019-07-10 15:07:32 +02:00
2019-07-10 15:07:32 +02:00
2019-07-10 15:07:32 +02:00
2019-07-09 18:27:41 +02:00

Build Status Coverage Status

fa-diagrams

(WIP) SVG diagrams built from Font-Awesome icons

Build from sources

You will need subversion installed (used for precise folder fetching in GitHub)

git clone https://github.com/klemek/fa-diagrams.git
cd fa-diagrams
npm install
node build.sh

Usage

With node

const diag = require('fa-diagrams');

const data = {
    options: {
        font: 'Courier New'
    },
    nodes: [
        {
            name: 'node1',
            icon: 'server',
            bottom: {text: 'myserver' },
            top: {icon: 'node'}
        },
        {
            name: 'node2',
            icon: 'globe',
            bottom: {text: 'world'}
        }
    ],
    links: [
        {
            from: 'node1',
            to: 'node2',
            bottom: {text: 'Hello World!'}
        }
    ]
};

const svg = diag.compute(data); // string containing xml data

Will produce the following diagram :

sample

On web page

<head>
    ...
    <script src="fa-diagrams-data.min.js"></script>
    <script src="fa-diagrams.min.js"></script>
    ...
</head>
<body>
...
<script>
    ...
    const svg = faDiagrams.compute(data); // string containing xml data
    ...
</script>
...
</body>
</html>
S
Description
SVG diagrams built from Font-Awesome icons
Readme 1.1 MiB
Languages
JavaScript 100%