0.9.2 • Published 3 years ago

@dasiux/dashboard-generator v0.9.2

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

dashboard-generator

Dashboard Generator, build a static html file with a tree of links.

Install

npm i -g @dasiux/dashboard-generator

How to use

Create a json file with following structure and fill the tree property with objects. The first level must always contain an object and represents your base groups. Properties are the labels and slugged for icon reference, values are the link. To add sub groups use nested objects.

{
  "title": "my Dashboard",
  "tree": {
    "group1": {
      "link1": "#url1"
    },
    "group2": {
      "link2": "#url2",
      "nested": {
        "link3": "#url3"
      }
    }
  }
}

To add spacers use a single # as the link value.

{
  "link1": "#url1",
  "-1": "#"
}

Run the generator with following command:

dashg path/to/src.json

Options can be set as following:

Short# -o
Short# -o=value
Escaped # -o="value value"

Long # --option
Long # --option=value
Escaped # --option="value value"

Settings

ShortLongTypeDescription
-o--outputPathUses current cwd if not set
-r--replaceBoolReplace target
-s--sassPathExtend theme with your own sass code
-d--devBoolEnable dev output

Theme option examples

OptionValues
--t-stylenone, simple, smooth, sharp
--t-tree-nestingnone, indent
--t-background-stylenone, gradient, gradient-animated, image

See the defaults.json and _theme.scss for all available values. These options can also be set in your source json.