initial commit

This commit is contained in:
Klemek
2019-07-09 18:24:06 +02:00
commit 52825c8c3f
8 changed files with 4708 additions and 0 deletions
+3
View File
@@ -0,0 +1,3 @@
/.idea
/node_modules
/coverage
+1
View File
@@ -0,0 +1 @@
/node_modules
+21
View File
@@ -0,0 +1,21 @@
{
"esversion": 6,
"maxerr": 999,
"indent": true,
"camelcase": true,
"eqeqeq": true,
"forin": true,
"immed": true,
"latedef": true,
"noarg": true,
"noempty": true,
"nonew": true,
"undef": true,
"unused": true,
"varstmt": true,
"sub": true,
"quotmark": "single",
"node": true,
"globals": {
}
}
+13
View File
@@ -0,0 +1,13 @@
dist: xenial
language: node_js
node_js:
- "12"
cache:
npm: true
directories:
- node_modules
install:
- npm install
script:
- jest --silent --coverage --coverageReporters=text-lcov | coveralls
- jshint ./src
+44
View File
@@ -0,0 +1,44 @@
[![Build Status](https://img.shields.io/travis/Klemek/fa-diagrams.svg?branch=master)](https://travis-ci.org/Klemek/fa-diagrams)
[![Coverage Status](https://img.shields.io/coveralls/github/Klemek/fa-diagrams.svg?branch=master)](https://coveralls.io/github/Klemek/fa-diagrams?branch=master)
# fa-diagrams
## (WIP) SVG diagrams built from Font-Awesome icons
How to use (theorically)
```javascript
const diag = require('fa-diagrams');
const data = {
options: {
font: 'times'
},
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](sample.png)
+4591
View File
File diff suppressed because it is too large Load Diff
+35
View File
@@ -0,0 +1,35 @@
{
"name": "fa-diagrams",
"version": "1.0.0",
"description": "SVG diagrams built from Font-Awesome icons",
"main": "index.js",
"scripts": {
"test": "jest --silent"
},
"repository": {
"type": "git",
"url": "git+https://github.com/Klemek/fa-diagrams.git"
},
"keywords": [
"font-awesome",
"diagram",
"icon"
],
"author": "Klemek",
"license": "ISC",
"bugs": {
"url": "https://github.com/Klemek/fa-diagrams/issues"
},
"homepage": "https://github.com/Klemek/fa-diagrams#readme",
"dependencies": {
"coveralls": "^3.0.4",
"jest": "^24.8.0",
"jshint": "^2.10.2"
},
"jest": {
"collectCoverageFrom": [
"src/**/*.js",
"!/node_modules/"
]
}
}
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB