roc
Version:
Build modern web applications easily
1,630 lines (1,629 loc) • 202 kB
JSON
{
"type": "Program",
"start": 0,
"end": 3416,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 106,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 37,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 37
}
},
"specifiers": [],
"source": {
"type": "Literal",
"start": 7,
"end": 36,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 36
}
},
"value": "source-map-support/register",
"rawValue": "source-map-support/register",
"raw": "'source-map-support/register'"
}
},
{
"type": "ImportDeclaration",
"start": 39,
"end": 71,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 32
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 48,
"end": 54,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 15
}
},
"imported": {
"type": "Identifier",
"start": 48,
"end": 54,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 15
}
},
"name": "escape"
},
"local": {
"type": "Identifier",
"start": 48,
"end": 54,
"loc": {
"start": {
"line": 3,
"column": 9
},
"end": {
"line": 3,
"column": 15
}
},
"name": "escape"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 62,
"end": 70,
"loc": {
"start": {
"line": 3,
"column": 23
},
"end": {
"line": 3,
"column": 31
}
},
"value": "lodash",
"rawValue": "lodash",
"raw": "'lodash'"
}
},
{
"type": "ImportDeclaration",
"start": 73,
"end": 156,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 83
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 80,
"end": 104,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 31
}
},
"local": {
"type": "Identifier",
"start": 80,
"end": 104,
"loc": {
"start": {
"line": 5,
"column": 7
},
"end": {
"line": 5,
"column": 31
}
},
"name": "buildDocumentationObject"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 110,
"end": 155,
"loc": {
"start": {
"line": 5,
"column": 37
},
"end": {
"line": 5,
"column": 82
}
},
"value": "../documentation/build-documentation-object",
"rawValue": "../documentation/build-documentation-object",
"raw": "'../documentation/build-documentation-object'"
}
},
{
"type": "ImportDeclaration",
"start": 157,
"end": 217,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 60
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 164,
"end": 177,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 20
}
},
"local": {
"type": "Identifier",
"start": 164,
"end": 177,
"loc": {
"start": {
"line": 6,
"column": 7
},
"end": {
"line": 6,
"column": 20
}
},
"name": "generateTable"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 183,
"end": 216,
"loc": {
"start": {
"line": 6,
"column": 26
},
"end": {
"line": 6,
"column": 59
}
},
"value": "../documentation/generate-table",
"rawValue": "../documentation/generate-table",
"raw": "'../documentation/generate-table'"
}
},
{
"type": "ImportDeclaration",
"start": 218,
"end": 282,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 64
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 227,
"end": 230,
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 12
}
},
"imported": {
"type": "Identifier",
"start": 227,
"end": 230,
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 12
}
},
"name": "pad"
},
"local": {
"type": "Identifier",
"start": 227,
"end": 230,
"loc": {
"start": {
"line": 7,
"column": 9
},
"end": {
"line": 7,
"column": 12
}
},
"name": "pad"
}
},
{
"type": "ImportSpecifier",
"start": 232,
"end": 247,
"loc": {
"start": {
"line": 7,
"column": 14
},
"end": {
"line": 7,
"column": 29
}
},
"imported": {
"type": "Identifier",
"start": 232,
"end": 247,
"loc": {
"start": {
"line": 7,
"column": 14
},
"end": {
"line": 7,
"column": 29
}
},
"name": "getDefaultValue"
},
"local": {
"type": "Identifier",
"start": 232,
"end": 247,
"loc": {
"start": {
"line": 7,
"column": 14
},
"end": {
"line": 7,
"column": 29
}
},
"name": "getDefaultValue"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 255,
"end": 281,
"loc": {
"start": {
"line": 7,
"column": 37
},
"end": {
"line": 7,
"column": 63
}
},
"value": "../documentation/helpers",
"rawValue": "../documentation/helpers",
"raw": "'../documentation/helpers'"
}
},
{
"type": "ImportDeclaration",
"start": 283,
"end": 351,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 68
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 292,
"end": 311,
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 28
}
},
"imported": {
"type": "Identifier",
"start": 292,
"end": 297,
"loc": {
"start": {
"line": 8,
"column": 9
},
"end": {
"line": 8,
"column": 14
}
},
"name": "error"
},
"local": {
"type": "Identifier",
"start": 301,
"end": 311,
"loc": {
"start": {
"line": 8,
"column": 18
},
"end": {
"line": 8,
"column": 28
}
},
"name": "styleError"
}
},
{
"type": "ImportSpecifier",
"start": 313,
"end": 320,
"loc": {
"start": {
"line": 8,
"column": 30
},
"end": {
"line": 8,
"column": 37
}
},
"imported": {
"type": "Identifier",
"start": 313,
"end": 320,
"loc": {
"start": {
"line": 8,
"column": 30
},
"end": {
"line": 8,
"column": 37
}
},
"name": "warning"
},
"local": {
"type": "Identifier",
"start": 313,
"end": 320,
"loc": {
"start": {
"line": 8,
"column": 30
},
"end": {
"line": 8,
"column": 37
}
},
"name": "warning"
}
},
{
"type": "ImportSpecifier",
"start": 322,
"end": 324,
"loc": {
"start": {
"line": 8,
"column": 39
},
"end": {
"line": 8,
"column": 41
}
},
"imported": {
"type": "Identifier",
"start": 322,
"end": 324,
"loc": {
"start": {
"line": 8,
"column": 39
},
"end": {
"line": 8,
"column": 41
}
},
"name": "ok"
},
"local": {
"type": "Identifier",
"start": 322,
"end": 324,
"loc": {
"start": {
"line": 8,
"column": 39
},
"end": {
"line": 8,
"column": 41
}
},
"name": "ok"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 332,
"end": 350,
"loc": {
"start": {
"line": 8,
"column": 49
},
"end": {
"line": 8,
"column": 67
}
},
"value": "../helpers/style",
"rawValue": "../helpers/style",
"raw": "'../helpers/style'"
},
"trailingComments": [
{
"type": "Block",
"value": "*\n * Generates markdown documentation for the provided configuration object.\n *\n * @param {rocConfig} config - The configuration object to generate documentation for.\n * @param {rocMetaConfig} metaConfig - The meta configuration object that has information about the config object.\n * @param {string[]} [filter=[]] - The groups that should be includes, by default all will be used.\n *\n * @returns {string} - A markdown table as a string.\n ",
"start": 353,
"end": 796,
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 18,
"column": 3
}
},
"range": [
353,
796
]
}
]
},
{
"type": "ExportNamedDeclaration",
"start": 797,
"end": 1935,
"loc": {
"start": {
"line": 19,
"column": 0
},
"end": {
"line": 58,
"column": 1
}
},
"declaration": {
"type": "FunctionDeclaration",
"start": 804,
"end": 1935,
"loc": {
"start": {
"line": 19,
"column": 7
},
"end": {
"line": 58,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 813,
"end": 842,
"loc": {
"start": {
"line": 19,
"column": 16
},
"end": {
"line": 19,
"column": 45
}
},
"name": "generateMarkdownDocumentation",
"leadingComments": null
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "ObjectPattern",
"start": 843,
"end": 855,
"loc": {
"start": {
"line": 19,
"column": 46
},
"end": {
"line": 19,
"column": 58
}
},
"properties": [
{
"type": "Property",
"start": 845,
"end": 853,
"loc": {
"start": {
"line": 19,
"column": 48
},
"end": {
"line": 19,
"column": 56
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 845,
"end": 853,
"loc": {
"start": {
"line": 19,
"column": 48
},
"end": {
"line": 19,
"column": 56
}
},
"name": "settings"
},
"kind": "init",
"value": {
"type": "Identifier",
"start": 845,
"end": 853,
"loc": {
"start": {
"line": 19,
"column": 48
},
"end": {
"line": 19,
"column": 56
}
},
"name": "settings"
}
}
]
},
{
"type": "ObjectPattern",
"start": 857,
"end": 875,
"loc": {
"start": {
"line": 19,
"column": 60
},
"end": {
"line": 19,
"column": 78
}
},
"properties": [
{
"type": "Property",
"start": 859,
"end": 873,
"loc": {
"start": {
"line": 19,
"column": 62
},
"end": {
"line": 19,
"column": 76
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 859,
"end": 867,
"loc": {
"start": {
"line": 19,
"column": 62
},
"end": {
"line": 19,
"column": 70
}
},
"name": "settings"
},
"value": {
"type": "Identifier",
"start": 869,
"end": 873,
"loc": {
"start": {
"line": 19,
"column": 72
},
"end": {
"line": 19,
"column": 76
}
},
"name": "meta"
},
"kind": "init"
}
]
},
{
"type": "AssignmentPattern",
"start": 877,
"end": 888,
"loc": {
"start": {
"line": 19,
"column": 80
},
"end": {
"line": 19,
"column": 91
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 877,
"end": 883,
"loc": {
"start": {
"line": 19,
"column": 80
},
"end": {
"line": 19,
"column": 86
}
},
"name": "filter"
},
"right": {
"type": "ArrayExpression",
"start": 886,
"end": 888,
"loc": {
"start": {
"line": 19,
"column": 89
},
"end": {
"line": 19,
"column": 91
}
},
"elements": []
}
}
],
"body": {
"type": "BlockStatement",
"start": 890,
"end": 1935,
"loc": {
"start": {
"line": 19,
"column": 93
},
"end": {
"line": 58,
"column": 1
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 896,
"end": 973,
"loc": {
"start": {
"line": 20,
"column": 4
},
"end": {
"line": 20,
"column": 81
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 902,
"end": 972,
"loc": {
"start": {
"line": 20,
"column": 10
},
"end": {
"line": 20,
"column": 80
}
},
"id": {
"type": "Identifier",
"start": 902,
"end": 921,
"loc": {
"start": {
"line": 20,
"column": 10
},
"end": {
"line": 20,
"column": 29
}
},
"name": "documentationObject"
},
"init": {
"type": "CallExpression",
"start": 924,
"end": 972,
"loc": {
"start": {
"line": 20,
"column": 32
},
"end": {
"line": 20,
"column": 80
}
},
"callee": {
"type": "Identifier",
"start": 924,
"end": 948,
"loc": {
"start": {
"line": 20,
"column": 32
},
"end": {
"line": 20,
"column": 56
}
},
"name": "buildDocumentationObject"
},
"arguments": [
{
"type": "Identifier",
"start": 949,
"end": 957,
"loc": {
"start": {
"line": 20,
"column": 57
},
"end": {
"line": 20,
"column": 65
}
},
"name": "settings"
},
{
"type": "Identifier",
"start": 959,
"end": 963,
"loc": {
"start": {
"line": 20,
"column": 67
},
"end": {
"line": 20,
"column": 71
}
},
"name": "meta"
},
{
"type": "Identifier",
"start": 965,
"end": 971,
"loc": {
"start": {
"line": 20,
"column": 73
},
"end": {
"line": 20,
"column": 79
}
},
"name": "filter"
}
]
}
}
],
"kind": "const"
},
{
"type": "VariableDeclaration",
"start": 979,
"end": 1751,
"loc": {
"start": {
"line": 22,
"column": 4
},
"end": {
"line": 53,
"column": 6
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 985,
"end": 1750,
"loc": {
"start": {
"line": 22,
"column": 10
},
"end": {
"line": 53,
"column": 5
}
},
"id": {
"type": "Identifier",
"start": 985,
"end": 991,
"loc": {
"start": {
"line": 22,
"column": 10
},
"end": {
"line": 22,
"column": 16
}
},
"name": "header"
},
"init": {
"type": "ObjectExpression",
"start": 994,
"end": 1750,
"loc": {
"start": {
"line": 22,
"column": 19
},
"end": {
"line": 53,
"column": 5
}
},
"properties": [
{
"type": "Property",
"start": 1004,
"end": 1046,
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 25,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1004,
"end": 1008,
"loc": {
"start": {
"line": 23,
"column": 8
},
"end": {
"line": 23,
"column": 12
}
},
"name": "name"
},
"value": {
"type": "ObjectExpression",
"start": 1010,
"end": 1046,
"loc": {
"start": {
"line": 23,
"column": 14
},
"end": {
"line": 25,
"column": 9
}
},
"properties": [
{
"type": "Property",
"start": 1024,
"end": 1036,
"loc": {
"start": {
"line": 24,
"column": 12
},
"end": {
"line": 24,
"column": 24
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1024,
"end": 1028,
"loc": {
"start": {
"line": 24,
"column": 12
},
"end": {
"line": 24,
"column": 16
}
},
"name": "name"
},
"value": {
"type": "Literal",
"start": 1030,
"end": 1036,
"loc": {
"start": {
"line": 24,
"column": 18
},
"end": {
"line": 24,
"column": 24
}
},
"value": "Name",
"rawValue": "Name",
"raw": "'Name'"
},
"kind": "init"
}
]
},
"kind": "init"
},
{
"type": "Property",
"start": 1056,
"end": 1160,
"loc": {
"start": {
"line": 26,
"column": 8
},
"end": {
"line": 29,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1056,
"end": 1067,
"loc": {
"start": {
"line": 26,
"column": 8
},
"end": {
"line": 26,
"column": 19
}
},
"name": "description"
},
"value": {
"type": "ObjectExpression",
"start": 1069,
"end": 1160,
"loc": {
"start": {
"line": 26,
"column": 21
},
"end": {
"line": 29,
"column": 9
}
},
"properties": [
{
"type": "Property",
"start": 1083,
"end": 1102,
"loc": {
"start": {
"line": 27,
"column": 12
},
"end": {
"line": 27,
"column": 31
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1083,
"end": 1087,
"loc": {
"start": {
"line": 27,
"column": 12
},
"end": {
"line": 27,
"column": 16
}
},
"name": "name"
},
"value": {
"type": "Literal",
"start": 1089,
"end": 1102,
"loc": {
"start": {
"line": 27,
"column": 18
},
"end": {
"line": 27,
"column": 31
}
},
"value": "Description",
"rawValue": "Description",
"raw": "'Description'"
},
"kind": "init"
},
{
"type": "Property",
"start": 1116,
"end": 1150,
"loc": {
"start": {
"line": 28,
"column": 12
},
"end": {
"line": 28,
"column": 46
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1116,
"end": 1124,
"loc": {
"start": {
"line": 28,
"column": 12
},
"end": {
"line": 28,
"column": 20
}
},
"name": "renderer"
},
"value": {
"type": "ArrowFunctionExpression",
"start": 1126,
"end": 1150,
"loc": {
"start": {
"line": 28,
"column": 22
},
"end": {
"line": 28,
"column": 46
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [
{
"type": "Identifier",
"start": 1127,
"end": 1132,
"loc": {
"start": {
"line": 28,
"column": 23
},
"end": {
"line": 28,
"column": 28
}
},
"name": "input"
}
],
"body": {
"type": "CallExpression",
"start": 1137,
"end": 1150,
"loc": {
"start": {
"line": 28,
"column": 33
},
"end": {
"line": 28,
"column": 46
}
},
"callee": {
"type": "Identifier",
"start": 1137,
"end": 1143,
"loc": {
"start": {
"line": 28,
"column": 33
},
"end": {
"line": 28,
"column": 39
}
},
"name": "escape"
},
"arguments": [
{
"type": "Identifier",
"start": 1144,
"end": 1149,
"loc": {
"start": {
"line": 28,
"column": 40
},
"end": {
"line": 28,
"column": 45
}
},
"name": "input"
}
]
}
},
"kind": "init"
}
]
},
"kind": "init"
},
{
"type": "Property",
"start": 1170,
"end": 1212,
"loc": {
"start": {
"line": 30,
"column": 8
},
"end": {
"line": 32,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1170,
"end": 1174,
"loc": {
"start": {
"line": 30,
"column": 8
},
"end": {
"line": 30,
"column": 12
}
},
"name": "path"
},
"value": {
"type": "ObjectExpression",
"start": 1176,
"end": 1212,
"loc": {
"start": {
"line": 30,
"column": 14
},
"end": {
"line": 32,
"column": 9
}
},
"properties": [
{
"type": "Property",
"start": 1190,
"end": 1202,
"loc": {
"start": {
"line": 31,
"column": 12
},
"end": {
"line": 31,
"column": 24
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1190,
"end": 1194,
"loc": {
"start": {
"line": 31,
"column": 12
},
"end": {
"line": 31,
"column": 16
}
},
"name": "name"
},
"value": {
"type": "Literal",
"start": 1196,
"end": 1202,
"loc": {
"start": {
"line": 31,
"column": 18
},
"end": {
"line": 31,
"column": 24
}
},
"value": "Path",
"rawValue": "Path",
"raw": "'Path'"
},
"kind": "init"
}
]
},
"kind": "init"
},
{
"type": "Property",
"start": 1222,
"end": 1267,
"loc": {
"start": {
"line": 33,
"column": 8
},
"end": {
"line": 35,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1222,
"end": 1225,
"loc": {
"start": {
"line": 33,
"column": 8
},
"end": {
"line": 33,
"column": 11
}
},
"name": "cli"
},
"value": {
"type": "ObjectExpression",
"start": 1227,
"end": 1267,
"loc": {
"start": {
"line": 33,
"column": 13
},
"end": {
"line": 35,
"column": 9
}
},
"properties": [
{
"type": "Property",
"start": 1241,
"end": 1257,
"loc": {
"start": {
"line": 34,
"column": 12
},
"end": {
"line": 34,
"column": 28
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1241,
"end": 1245,
"loc": {
"start": {
"line": 34,
"column": 12
},
"end": {
"line": 34,
"column": 16
}
},
"name": "name"
},
"value": {
"type": "Literal",
"start": 1247,
"end": 1257,
"loc": {
"start": {
"line": 34,
"column": 18
},
"end": {
"line": 34,
"column": 28
}
},
"value": "CLI Flag",
"rawValue": "CLI Flag",
"raw": "'CLI Flag'"
},
"kind": "init"
}
]
},
"kind": "init"
},
{
"type": "Property",
"start": 1277,
"end": 1405,
"loc": {
"start": {
"line": 36,
"column": 8
},
"end": {
"line": 39,
"column": 9
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 1277,
"end": 1289,
"loc": {
"start": {
"line": 36,
"column": 8
},
"end": {
"line": 36,
"column": 20
}
},
"name": "defaultValue"
},
"value": {
"type": "ObjectExpression",
"start": 1291,
"end": 1405,
"loc": {
"start": {
"line": 36,
"column": 22
},
"end": {
"line": 39,
"column": 9
}
},
"properties": [
{
"type": "Property",
"start": 1305,
"end": 1320,
"loc": {