roc
Version:
Build modern web applications easily
1,635 lines (1,634 loc) • 112 kB
JSON
{
"type": "Program",
"start": 0,
"end": 2952,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 95,
"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": 76,
"loc": {
"start": {
"line": 3,
"column": 0
},
"end": {
"line": 3,
"column": 37
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 46,
"end": 56,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 17
}
},
"local": {
"type": "Identifier",
"start": 46,
"end": 56,
"loc": {
"start": {
"line": 3,
"column": 7
},
"end": {
"line": 3,
"column": 17
}
},
"name": "deepExtend"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 62,
"end": 75,
"loc": {
"start": {
"line": 3,
"column": 23
},
"end": {
"line": 3,
"column": 36
}
},
"value": "deep-extend",
"rawValue": "deep-extend",
"raw": "'deep-extend'"
}
},
{
"type": "ImportDeclaration",
"start": 78,
"end": 121,
"loc": {
"start": {
"line": 5,
"column": 0
},
"end": {
"line": 5,
"column": 43
}
},
"specifiers": [
{
"type": "ImportSpecifier",
"start": 87,
"end": 94,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 16
}
},
"imported": {
"type": "Identifier",
"start": 87,
"end": 94,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 16
}
},
"name": "warning"
},
"local": {
"type": "Identifier",
"start": 87,
"end": 94,
"loc": {
"start": {
"line": 5,
"column": 9
},
"end": {
"line": 5,
"column": 16
}
},
"name": "warning"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 102,
"end": 120,
"loc": {
"start": {
"line": 5,
"column": 24
},
"end": {
"line": 5,
"column": 42
}
},
"value": "../helpers/style",
"rawValue": "../helpers/style",
"raw": "'../helpers/style'"
},
"trailingComments": [
{
"type": "Block",
"value": " Make sure that we only print some feedback once ",
"start": 123,
"end": 176,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 53
}
},
"range": [
123,
176
]
}
]
},
{
"type": "VariableDeclaration",
"start": 177,
"end": 201,
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 8,
"column": 24
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 181,
"end": 200,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 23
}
},
"id": {
"type": "Identifier",
"start": 181,
"end": 193,
"loc": {
"start": {
"line": 8,
"column": 4
},
"end": {
"line": 8,
"column": 16
}
},
"name": "onceSettings",
"leadingComments": null
},
"init": {
"type": "Literal",
"start": 196,
"end": 200,
"loc": {
"start": {
"line": 8,
"column": 19
},
"end": {
"line": 8,
"column": 23
}
},
"value": true,
"rawValue": true,
"raw": "true"
},
"leadingComments": null
}
],
"kind": "let",
"leadingComments": [
{
"type": "Block",
"value": " Make sure that we only print some feedback once ",
"start": 123,
"end": 176,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 53
}
},
"range": [
123,
176
]
}
],
"trailingComments": [
{
"type": "Block",
"value": " Using global variables here to make sure that we can access the values set from different projects.\n * This guarantees that the variables will live outside the require cache, something that we need for stability.\n ",
"start": 203,
"end": 422,
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 12,
"column": 3
}
},
"range": [
203,
422
]
}
]
},
{
"type": "ExpressionStatement",
"start": 423,
"end": 465,
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 13,
"column": 42
}
},
"expression": {
"type": "AssignmentExpression",
"start": 423,
"end": 464,
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 13,
"column": 41
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 423,
"end": 439,
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 13,
"column": 16
}
},
"object": {
"type": "Identifier",
"start": 423,
"end": 429,
"loc": {
"start": {
"line": 13,
"column": 0
},
"end": {
"line": 13,
"column": 6
}
},
"name": "global",
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 430,
"end": 439,
"loc": {
"start": {
"line": 13,
"column": 7
},
"end": {
"line": 13,
"column": 16
}
},
"name": "rocConfig"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "LogicalExpression",
"start": 442,
"end": 464,
"loc": {
"start": {
"line": 13,
"column": 19
},
"end": {
"line": 13,
"column": 41
}
},
"left": {
"type": "MemberExpression",
"start": 442,
"end": 458,
"loc": {
"start": {
"line": 13,
"column": 19
},
"end": {
"line": 13,
"column": 35
}
},
"object": {
"type": "Identifier",
"start": 442,
"end": 448,
"loc": {
"start": {
"line": 13,
"column": 19
},
"end": {
"line": 13,
"column": 25
}
},
"name": "global"
},
"property": {
"type": "Identifier",
"start": 449,
"end": 458,
"loc": {
"start": {
"line": 13,
"column": 26
},
"end": {
"line": 13,
"column": 35
}
},
"name": "rocConfig"
},
"computed": false
},
"operator": "||",
"right": {
"type": "ObjectExpression",
"start": 462,
"end": 464,
"loc": {
"start": {
"line": 13,
"column": 39
},
"end": {
"line": 13,
"column": 41
}
},
"properties": []
}
},
"leadingComments": null
},
"leadingComments": [
{
"type": "Block",
"value": " Using global variables here to make sure that we can access the values set from different projects.\n * This guarantees that the variables will live outside the require cache, something that we need for stability.\n ",
"start": 203,
"end": 422,
"loc": {
"start": {
"line": 10,
"column": 0
},
"end": {
"line": 12,
"column": 3
}
},
"range": [
203,
422
]
}
],
"trailingComments": [
{
"type": "Block",
"value": "*\n * Merges two configuration objects.\n *\n * @param {!Object} a - Configuration object to base the merge on.\n * @param {!Object} b - Configuration object that is merged into the first, overwriting the first one.\n *\n * @returns {Object} - The merged configuration object\n ",
"start": 467,
"end": 742,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 22,
"column": 3
}
},
"range": [
467,
742
]
}
]
},
{
"type": "ExportNamedDeclaration",
"start": 743,
"end": 807,
"loc": {
"start": {
"line": 23,
"column": 0
},
"end": {
"line": 25,
"column": 1
}
},
"declaration": {
"type": "FunctionDeclaration",
"start": 750,
"end": 807,
"loc": {
"start": {
"line": 23,
"column": 7
},
"end": {
"line": 25,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 759,
"end": 764,
"loc": {
"start": {
"line": 23,
"column": 16
},
"end": {
"line": 23,
"column": 21
}
},
"name": "merge",
"leadingComments": null
},
"generator": false,
"expression": false,
"async": false,
"params": [
{
"type": "Identifier",
"start": 765,
"end": 766,
"loc": {
"start": {
"line": 23,
"column": 22
},
"end": {
"line": 23,
"column": 23
}
},
"name": "a"
},
{
"type": "Identifier",
"start": 768,
"end": 769,
"loc": {
"start": {
"line": 23,
"column": 25
},
"end": {
"line": 23,
"column": 26
}
},
"name": "b"
}
],
"body": {
"type": "BlockStatement",
"start": 771,
"end": 807,
"loc": {
"start": {
"line": 23,
"column": 28
},
"end": {
"line": 25,
"column": 1
}
},
"body": [
{
"type": "ReturnStatement",
"start": 777,
"end": 805,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 32
}
},
"argument": {
"type": "CallExpression",
"start": 784,
"end": 804,
"loc": {
"start": {
"line": 24,
"column": 11
},
"end": {
"line": 24,
"column": 31
}
},
"callee": {
"type": "Identifier",
"start": 784,
"end": 794,
"loc": {
"start": {
"line": 24,
"column": 11
},
"end": {
"line": 24,
"column": 21
}
},
"name": "deepExtend"
},
"arguments": [
{
"type": "ObjectExpression",
"start": 795,
"end": 797,
"loc": {
"start": {
"line": 24,
"column": 22
},
"end": {
"line": 24,
"column": 24
}
},
"properties": []
},
{
"type": "Identifier",
"start": 799,
"end": 800,
"loc": {
"start": {
"line": 24,
"column": 26
},
"end": {
"line": 24,
"column": 27
}
},
"name": "a"
},
{
"type": "Identifier",
"start": 802,
"end": 803,
"loc": {
"start": {
"line": 24,
"column": 29
},
"end": {
"line": 24,
"column": 30
}
},
"name": "b"
}
]
}
}
],
"trailingComments": null
},
"leadingComments": [
{
"type": "Block",
"value": "*\n * Merges two configuration objects.\n *\n * @param {!Object} a - Configuration object to base the merge on.\n * @param {!Object} b - Configuration object that is merged into the first, overwriting the first one.\n *\n * @returns {Object} - The merged configuration object\n ",
"start": 467,
"end": 742,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 22,
"column": 3
}
},
"range": [
467,
742
]
}
],
"trailingComments": [
{
"type": "Block",
"value": "*\n * Gets the current configuration object.\n *\n * @returns {rocConfig} - The application configuration object.\n ",
"start": 809,
"end": 925,
"loc": {
"start": {
"line": 27,
"column": 0
},
"end": {
"line": 31,
"column": 3
}
},
"range": [
809,
925
]
}
]
},
"specifiers": [],
"source": null,
"leadingComments": [
{
"type": "Block",
"value": "*\n * Merges two configuration objects.\n *\n * @param {!Object} a - Configuration object to base the merge on.\n * @param {!Object} b - Configuration object that is merged into the first, overwriting the first one.\n *\n * @returns {Object} - The merged configuration object\n ",
"start": 467,
"end": 742,
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 22,
"column": 3
}
},
"range": [
467,
742
]
}
],
"trailingComments": [
{
"type": "Block",
"value": "*\n * Gets the current configuration object.\n *\n * @returns {rocConfig} - The application configuration object.\n ",
"start": 809,
"end": 925,
"loc": {
"start": {
"line": 27,
"column": 0
},
"end": {
"line": 31,
"column": 3
}
},
"range": [
809,
925
]
}
]
},
{
"type": "ExportNamedDeclaration",
"start": 926,
"end": 1628,
"loc": {
"start": {
"line": 32,
"column": 0
},
"end": {
"line": 50,
"column": 1
}
},
"declaration": {
"type": "FunctionDeclaration",
"start": 933,
"end": 1628,
"loc": {
"start": {
"line": 32,
"column": 7
},
"end": {
"line": 50,
"column": 1
}
},
"id": {
"type": "Identifier",
"start": 942,
"end": 951,
"loc": {
"start": {
"line": 32,
"column": 16
},
"end": {
"line": 32,
"column": 25
}
},
"name": "getConfig",
"leadingComments": null
},
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 954,
"end": 1628,
"loc": {
"start": {
"line": 32,
"column": 28
},
"end": {
"line": 50,
"column": 1
}
},
"body": [
{
"type": "IfStatement",
"start": 960,
"end": 1596,
"loc": {
"start": {
"line": 33,
"column": 4
},
"end": {
"line": 47,
"column": 5
}
},
"test": {
"type": "LogicalExpression",
"start": 964,
"end": 1011,
"loc": {
"start": {
"line": 33,
"column": 8
},
"end": {
"line": 33,
"column": 55
}
},
"left": {
"type": "Identifier",
"start": 964,
"end": 976,
"loc": {
"start": {
"line": 33,
"column": 8
},
"end": {
"line": 33,
"column": 20
}
},
"name": "onceSettings"
},
"operator": "&&",
"right": {
"type": "MemberExpression",
"start": 980,
"end": 1011,
"loc": {
"start": {
"line": 33,
"column": 24
},
"end": {
"line": 33,
"column": 55
}
},
"object": {
"type": "MemberExpression",
"start": 980,
"end": 991,
"loc": {
"start": {
"line": 33,
"column": 24
},
"end": {
"line": 33,
"column": 35
}
},
"object": {
"type": "Identifier",
"start": 980,
"end": 987,
"loc": {
"start": {
"line": 33,
"column": 24
},
"end": {
"line": 33,
"column": 31
}
},
"name": "process"
},
"property": {
"type": "Identifier",
"start": 988,
"end": 991,
"loc": {
"start": {
"line": 33,
"column": 32
},
"end": {
"line": 33,
"column": 35
}
},
"name": "env"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 992,
"end": 1011,
"loc": {
"start": {
"line": 33,
"column": 36
},
"end": {
"line": 33,
"column": 55
}
},
"name": "ROC_CONFIG_SETTINGS"
},
"computed": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 1013,
"end": 1596,
"loc": {
"start": {
"line": 33,
"column": 57
},
"end": {
"line": 47,
"column": 5
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 1023,
"end": 1044,
"loc": {
"start": {
"line": 34,
"column": 8
},
"end": {
"line": 34,
"column": 29
}
},
"expression": {
"type": "AssignmentExpression",
"start": 1023,
"end": 1043,
"loc": {
"start": {
"line": 34,
"column": 8
},
"end": {
"line": 34,
"column": 28
}
},
"operator": "=",
"left": {
"type": "Identifier",
"start": 1023,
"end": 1035,
"loc": {
"start": {
"line": 34,
"column": 8
},
"end": {
"line": 34,
"column": 20
}
},
"name": "onceSettings"
},
"right": {
"type": "Literal",
"start": 1038,
"end": 1043,
"loc": {
"start": {
"line": 34,
"column": 23
},
"end": {
"line": 34,
"column": 28
}
},
"value": false,
"rawValue": false,
"raw": "false"
}
}
},
{
"type": "IfStatement",
"start": 1054,
"end": 1520,
"loc": {
"start": {
"line": 36,
"column": 8
},
"end": {
"line": 44,
"column": 9
}
},
"test": {
"type": "LogicalExpression",
"start": 1058,
"end": 1183,
"loc": {
"start": {
"line": 36,
"column": 12
},
"end": {
"line": 37,
"column": 43
}
},
"left": {
"type": "LogicalExpression",
"start": 1058,
"end": 1136,
"loc": {
"start": {
"line": 36,
"column": 12
},
"end": {
"line": 36,
"column": 90
}
},
"left": {
"type": "MemberExpression",
"start": 1058,
"end": 1083,
"loc": {
"start": {
"line": 36,
"column": 12
},
"end": {
"line": 36,
"column": 37
}
},
"object": {
"type": "MemberExpression",
"start": 1058,
"end": 1074,
"loc": {
"start": {
"line": 36,
"column": 12
},
"end": {
"line": 36,
"column": 28
}
},
"object": {
"type": "Identifier",
"start": 1058,
"end": 1064,
"loc": {
"start": {
"line": 36,
"column": 12
},
"end": {
"line": 36,
"column": 18
}
},
"name": "global"
},
"property": {
"type": "Identifier",
"start": 1065,
"end": 1074,
"loc": {
"start": {
"line": 36,
"column": 19
},
"end": {
"line": 36,
"column": 28
}
},
"name": "rocConfig"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1075,
"end": 1083,
"loc": {
"start": {
"line": 36,
"column": 29
},
"end": {
"line": 36,
"column": 37
}
},
"name": "settings"
},
"computed": false
},
"operator": "&&",
"right": {
"type": "BinaryExpression",
"start": 1087,
"end": 1136,
"loc": {
"start": {
"line": 36,
"column": 41
},
"end": {
"line": 36,
"column": 90
}
},
"left": {
"type": "MemberExpression",
"start": 1087,
"end": 1132,
"loc": {
"start": {
"line": 36,
"column": 41
},
"end": {
"line": 36,
"column": 86
}
},
"object": {
"type": "CallExpression",
"start": 1087,
"end": 1125,
"loc": {
"start": {
"line": 36,
"column": 41
},
"end": {
"line": 36,
"column": 79
}
},
"callee": {
"type": "MemberExpression",
"start": 1087,
"end": 1098,
"loc": {
"start": {
"line": 36,
"column": 41
},
"end": {
"line": 36,
"column": 52
}
},
"object": {
"type": "Identifier",
"start": 1087,
"end": 1093,
"loc": {
"start": {
"line": 36,
"column": 41
},
"end": {
"line": 36,
"column": 47
}
},
"name": "Object"
},
"property": {
"type": "Identifier",
"start": 1094,
"end": 1098,
"loc": {
"start": {
"line": 36,
"column": 48
},
"end": {
"line": 36,
"column": 52
}
},
"name": "keys"
},
"computed": false
},
"arguments": [
{
"type": "MemberExpression",
"start": 1099,
"end": 1124,
"loc": {
"start": {
"line": 36,
"column": 53
},
"end": {
"line": 36,
"column": 78
}
},
"object": {
"type": "MemberExpression",
"start": 1099,
"end": 1115,
"loc": {
"start": {
"line": 36,
"column": 53
},
"end": {
"line": 36,
"column": 69
}
},
"object": {
"type": "Identifier",
"start": 1099,
"end": 1105,
"loc": {
"start": {
"line": 36,
"column": 53
},
"end": {
"line": 36,
"column": 59
}
},
"name": "global"
},
"property": {
"type": "Identifier",
"start": 1106,
"end": 1115,
"loc": {
"start": {
"line": 36,
"column": 60
},
"end": {
"line": 36,
"column": 69
}
},
"name": "rocConfig"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1116,
"end": 1124,
"loc": {
"start": {
"line": 36,
"column": 70
},
"end": {
"line": 36,
"column": 78
}
},
"name": "settings"
},
"computed": false
}
]
},
"property": {
"type": "Identifier",
"start": 1126,
"end": 1132,
"loc": {
"start": {
"line": 36,
"column": 80
},
"end": {
"line": 36,
"column": 86
}
},
"name": "length"
},
"computed": false
},
"operator": ">",
"right": {
"type": "Literal",
"start": 1135,
"end": 1136,
"loc": {
"start": {
"line": 36,
"column": 89
},
"end": {
"line": 36,
"column": 90
}
},
"value": 0,
"rawValue": 0,
"raw": "0"
}
}
},
"operator": "&&",
"right": {
"type": "MemberExpression",
"start": 1152,
"end": 1183,
"loc": {
"start": {
"line": 37,
"column": 12
},
"end": {
"line": 37,
"column": 43
}
},
"object": {
"type": "MemberExpression",
"start": 1152,
"end": 1163,
"loc": {
"start": {
"line": 37,
"column": 12
},
"end": {
"line": 37,
"column": 23
}
},
"object": {
"type": "Identifier",
"start": 1152,
"end": 1159,
"loc": {
"start": {
"line": 37,
"column": 12
},
"end": {
"line": 37,
"column": 19
}
},
"name": "process"
},
"property": {
"type": "Identifier",
"start": 1160,
"end": 1163,
"loc": {
"start": {
"line": 37,
"column": 20
},
"end": {
"line": 37,
"column": 23
}
},
"name": "env"
},
"computed": false
},
"property": {
"type": "Identifier",
"start": 1164,
"end": 1183,
"loc": {
"start": {
"line": 37,
"column": 24
},
"end": {
"line": 37,
"column": 43
}
},
"name": "ROC_CONFIG_SETTINGS"
},
"computed": false
}
},
"consequent": {
"type": "BlockStatement",
"start": 1194,
"end": 1520,
"loc": {
"start": {
"line": 38,
"column": 10
},
"end": {
"line": 44,
"column": 9
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 1208,
"end": 1510,
"loc": {
"start": {
"line": 39,
"column": 12
},
"end": {
"line": 43,
"column": 20
}
},
"expression": {
"type": "CallExpression",
"start": 1208,
"end": 1509,
"loc": {
"start": {
"line": 39,
"column": 12
},
"end": {
"line": 43,
"column": 19
}
},
"callee": {
"type": "MemberExpression",
"start": 1208,
"end": 1219,
"loc": {
"start": {
"line": 39,
"column": 12
},
"end": {
"line": 39,
"column": 23
}
},
"object": {
"type": "Identifier",
"start": 1208,
"end": 1215,
"loc": {
"start": {
"line": 39,
"column": 12
},
"end": {
"line": 39,
"column": 19
}
},
"name": "console"
},
"property": {
"type": "Identifier",
"start": 1216,
"end": 1219,
"loc": {
"start": {
"line": 39,
"column": 20
},
"end": {
"line": 39,
"column": 23
}
},
"name": "log"
},
"computed": false
},
"arguments": [
{
"type": "CallExpression",
"start": 1237,
"end": 1489,
"loc": {
"start": {
"line": 40,
"column": 16
},
"end": {
"line": 42,
"column": 73
}
},
"callee": {
"type": "Identifier",
"start": 1237,
"end": 1244,
"loc": {
"start": {
"line": 40,
"column": 16
},
"end": {
"line": 40,
"column": 23