rizzo-next
Version:
The next generation of Lonely Planet's style guide and pattern library.
1,634 lines (1,633 loc) • 119 kB
JSON
{
"type": "Program",
"start": 0,
"end": 1063,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 45,
"column": 0
}
},
"sourceType": "module",
"body": [
{
"type": "ImportDeclaration",
"start": 0,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 23
}
},
"specifiers": [
{
"type": "ImportDefaultSpecifier",
"start": 7,
"end": 8,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 8
}
},
"local": {
"type": "Identifier",
"start": 7,
"end": 8,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 8
}
},
"name": "$"
}
}
],
"importKind": "value",
"source": {
"type": "Literal",
"start": 14,
"end": 22,
"loc": {
"start": {
"line": 1,
"column": 14
},
"end": {
"line": 1,
"column": 22
}
},
"value": "jquery",
"rawValue": "jquery",
"raw": "\"jquery\""
}
},
{
"type": "VariableDeclaration",
"start": 24,
"end": 105,
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 81
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 28,
"end": 104,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 80
}
},
"id": {
"type": "Identifier",
"start": 28,
"end": 36,
"loc": {
"start": {
"line": 2,
"column": 4
},
"end": {
"line": 2,
"column": 12
}
},
"name": "Injector"
},
"init": {
"type": "CallExpression",
"start": 39,
"end": 104,
"loc": {
"start": {
"line": 2,
"column": 15
},
"end": {
"line": 2,
"column": 80
}
},
"callee": {
"type": "Identifier",
"start": 39,
"end": 46,
"loc": {
"start": {
"line": 2,
"column": 15
},
"end": {
"line": 2,
"column": 22
}
},
"name": "require"
},
"arguments": [
{
"type": "Literal",
"start": 47,
"end": 103,
"loc": {
"start": {
"line": 2,
"column": 23
},
"end": {
"line": 2,
"column": 79
}
},
"value": "inject!../../../src/components/header/header_component",
"rawValue": "inject!../../../src/components/header/header_component",
"raw": "\"inject!../../../src/components/header/header_component\""
}
]
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 107,
"end": 132,
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 25
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 111,
"end": 131,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 24
}
},
"id": {
"type": "Identifier",
"start": 111,
"end": 127,
"loc": {
"start": {
"line": 4,
"column": 4
},
"end": {
"line": 4,
"column": 20
}
},
"name": "showSearchCalled"
},
"init": {
"type": "Literal",
"start": 130,
"end": 131,
"loc": {
"start": {
"line": 4,
"column": 23
},
"end": {
"line": 4,
"column": 24
}
},
"value": 0,
"rawValue": 0,
"raw": "0"
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 134,
"end": 165,
"loc": {
"start": {
"line": 6,
"column": 0
},
"end": {
"line": 6,
"column": 31
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 138,
"end": 164,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 30
}
},
"id": {
"type": "Identifier",
"start": 138,
"end": 148,
"loc": {
"start": {
"line": 6,
"column": 4
},
"end": {
"line": 6,
"column": 14
}
},
"name": "SearchMock"
},
"init": {
"type": "FunctionExpression",
"start": 151,
"end": 164,
"loc": {
"start": {
"line": 6,
"column": 17
},
"end": {
"line": 6,
"column": 30
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 162,
"end": 164,
"loc": {
"start": {
"line": 6,
"column": 28
},
"end": {
"line": 6,
"column": 30
}
},
"body": []
}
}
}
],
"kind": "let"
},
{
"type": "ExpressionStatement",
"start": 166,
"end": 234,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 68
}
},
"expression": {
"type": "AssignmentExpression",
"start": 166,
"end": 233,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 67
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 166,
"end": 186,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 20
}
},
"object": {
"type": "Identifier",
"start": 166,
"end": 176,
"loc": {
"start": {
"line": 7,
"column": 0
},
"end": {
"line": 7,
"column": 10
}
},
"name": "SearchMock"
},
"property": {
"type": "Identifier",
"start": 177,
"end": 186,
"loc": {
"start": {
"line": 7,
"column": 11
},
"end": {
"line": 7,
"column": 20
}
},
"name": "prototype"
},
"computed": false
},
"right": {
"type": "ObjectExpression",
"start": 189,
"end": 233,
"loc": {
"start": {
"line": 7,
"column": 23
},
"end": {
"line": 7,
"column": 67
}
},
"properties": [
{
"type": "Property",
"start": 191,
"end": 231,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 7,
"column": 65
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 191,
"end": 195,
"loc": {
"start": {
"line": 7,
"column": 25
},
"end": {
"line": 7,
"column": 29
}
},
"name": "show"
},
"value": {
"type": "FunctionExpression",
"start": 197,
"end": 231,
"loc": {
"start": {
"line": 7,
"column": 31
},
"end": {
"line": 7,
"column": 65
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 208,
"end": 231,
"loc": {
"start": {
"line": 7,
"column": 42
},
"end": {
"line": 7,
"column": 65
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 210,
"end": 229,
"loc": {
"start": {
"line": 7,
"column": 44
},
"end": {
"line": 7,
"column": 63
}
},
"expression": {
"type": "UpdateExpression",
"start": 210,
"end": 228,
"loc": {
"start": {
"line": 7,
"column": 44
},
"end": {
"line": 7,
"column": 62
}
},
"operator": "++",
"prefix": true,
"argument": {
"type": "Identifier",
"start": 212,
"end": 228,
"loc": {
"start": {
"line": 7,
"column": 46
},
"end": {
"line": 7,
"column": 62
}
},
"name": "showSearchCalled"
}
}
}
]
}
},
"kind": "init"
}
]
}
}
},
{
"type": "VariableDeclaration",
"start": 236,
"end": 323,
"loc": {
"start": {
"line": 9,
"column": 0
},
"end": {
"line": 12,
"column": 3
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 240,
"end": 322,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 12,
"column": 2
}
},
"id": {
"type": "Identifier",
"start": 240,
"end": 246,
"loc": {
"start": {
"line": 9,
"column": 4
},
"end": {
"line": 9,
"column": 10
}
},
"name": "Header"
},
"init": {
"type": "CallExpression",
"start": 249,
"end": 322,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 12,
"column": 2
}
},
"callee": {
"type": "Identifier",
"start": 249,
"end": 257,
"loc": {
"start": {
"line": 9,
"column": 13
},
"end": {
"line": 9,
"column": 21
}
},
"name": "Injector"
},
"arguments": [
{
"type": "ObjectExpression",
"start": 258,
"end": 321,
"loc": {
"start": {
"line": 9,
"column": 22
},
"end": {
"line": 12,
"column": 1
}
},
"properties": [
{
"type": "Property",
"start": 262,
"end": 285,
"loc": {
"start": {
"line": 10,
"column": 2
},
"end": {
"line": 10,
"column": 25
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Literal",
"start": 262,
"end": 273,
"loc": {
"start": {
"line": 10,
"column": 2
},
"end": {
"line": 10,
"column": 13
}
},
"value": "../search",
"rawValue": "../search",
"raw": "\"../search\""
},
"value": {
"type": "Identifier",
"start": 275,
"end": 285,
"loc": {
"start": {
"line": 10,
"column": 15
},
"end": {
"line": 10,
"column": 25
}
},
"name": "SearchMock"
},
"kind": "init"
},
{
"type": "Property",
"start": 289,
"end": 319,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 32
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Literal",
"start": 289,
"end": 304,
"loc": {
"start": {
"line": 11,
"column": 2
},
"end": {
"line": 11,
"column": 17
}
},
"value": "../navigation",
"rawValue": "../navigation",
"raw": "\"../navigation\""
},
"value": {
"type": "FunctionExpression",
"start": 306,
"end": 319,
"loc": {
"start": {
"line": 11,
"column": 19
},
"end": {
"line": 11,
"column": 32
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 317,
"end": 319,
"loc": {
"start": {
"line": 11,
"column": 30
},
"end": {
"line": 11,
"column": 32
}
},
"body": []
}
},
"kind": "init"
}
]
}
]
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 325,
"end": 399,
"loc": {
"start": {
"line": 14,
"column": 0
},
"end": {
"line": 14,
"column": 74
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 329,
"end": 398,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 73
}
},
"id": {
"type": "Identifier",
"start": 329,
"end": 343,
"loc": {
"start": {
"line": 14,
"column": 4
},
"end": {
"line": 14,
"column": 18
}
},
"name": "headerTemplate"
},
"init": {
"type": "CallExpression",
"start": 346,
"end": 398,
"loc": {
"start": {
"line": 14,
"column": 21
},
"end": {
"line": 14,
"column": 73
}
},
"callee": {
"type": "Identifier",
"start": 346,
"end": 353,
"loc": {
"start": {
"line": 14,
"column": 21
},
"end": {
"line": 14,
"column": 28
}
},
"name": "require"
},
"arguments": [
{
"type": "Literal",
"start": 354,
"end": 397,
"loc": {
"start": {
"line": 14,
"column": 29
},
"end": {
"line": 14,
"column": 72
}
},
"value": "../../../src/components/header/header.hbs",
"rawValue": "../../../src/components/header/header.hbs",
"raw": "\"../../../src/components/header/header.hbs\""
}
]
}
}
],
"kind": "let"
},
{
"type": "VariableDeclaration",
"start": 401,
"end": 461,
"loc": {
"start": {
"line": 16,
"column": 0
},
"end": {
"line": 19,
"column": 3
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 405,
"end": 460,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 19,
"column": 2
}
},
"id": {
"type": "Identifier",
"start": 405,
"end": 409,
"loc": {
"start": {
"line": 16,
"column": 4
},
"end": {
"line": 16,
"column": 8
}
},
"name": "html"
},
"init": {
"type": "CallExpression",
"start": 412,
"end": 460,
"loc": {
"start": {
"line": 16,
"column": 11
},
"end": {
"line": 19,
"column": 2
}
},
"callee": {
"type": "Identifier",
"start": 412,
"end": 426,
"loc": {
"start": {
"line": 16,
"column": 11
},
"end": {
"line": 16,
"column": 25
}
},
"name": "headerTemplate"
},
"arguments": [
{
"type": "ObjectExpression",
"start": 427,
"end": 459,
"loc": {
"start": {
"line": 16,
"column": 26
},
"end": {
"line": 19,
"column": 1
}
},
"properties": [
{
"type": "Property",
"start": 431,
"end": 443,
"loc": {
"start": {
"line": 17,
"column": 2
},
"end": {
"line": 17,
"column": 14
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 431,
"end": 435,
"loc": {
"start": {
"line": 17,
"column": 2
},
"end": {
"line": 17,
"column": 6
}
},
"name": "type"
},
"value": {
"type": "Literal",
"start": 437,
"end": 443,
"loc": {
"start": {
"line": 17,
"column": 8
},
"end": {
"line": 17,
"column": 14
}
},
"value": "city",
"rawValue": "city",
"raw": "\"city\""
},
"kind": "init"
},
{
"type": "Property",
"start": 447,
"end": 457,
"loc": {
"start": {
"line": 18,
"column": 2
},
"end": {
"line": 18,
"column": 12
}
},
"method": false,
"shorthand": false,
"computed": false,
"key": {
"type": "Identifier",
"start": 447,
"end": 453,
"loc": {
"start": {
"line": 18,
"column": 2
},
"end": {
"line": 18,
"column": 8
}
},
"name": "images"
},
"value": {
"type": "ArrayExpression",
"start": 455,
"end": 457,
"loc": {
"start": {
"line": 18,
"column": 10
},
"end": {
"line": 18,
"column": 12
}
},
"elements": []
},
"kind": "init"
}
]
}
]
}
}
],
"kind": "let",
"trailingComments": [
{
"type": "Block",
"value": "* @test {Header} ",
"start": 463,
"end": 484,
"loc": {
"start": {
"line": 21,
"column": 0
},
"end": {
"line": 21,
"column": 21
}
},
"range": [
463,
484
]
}
]
},
{
"type": "ExpressionStatement",
"start": 485,
"end": 1062,
"loc": {
"start": {
"line": 22,
"column": 0
},
"end": {
"line": 44,
"column": 3
}
},
"expression": {
"type": "CallExpression",
"start": 485,
"end": 1061,
"loc": {
"start": {
"line": 22,
"column": 0
},
"end": {
"line": 44,
"column": 2
}
},
"callee": {
"type": "Identifier",
"start": 485,
"end": 493,
"loc": {
"start": {
"line": 22,
"column": 0
},
"end": {
"line": 22,
"column": 8
}
},
"name": "describe",
"leadingComments": null
},
"arguments": [
{
"type": "Literal",
"start": 494,
"end": 502,
"loc": {
"start": {
"line": 22,
"column": 9
},
"end": {
"line": 22,
"column": 17
}
},
"value": "header",
"rawValue": "header",
"raw": "\"header\""
},
{
"type": "ArrowFunctionExpression",
"start": 504,
"end": 1060,
"loc": {
"start": {
"line": 22,
"column": 19
},
"end": {
"line": 44,
"column": 1
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 510,
"end": 1060,
"loc": {
"start": {
"line": 22,
"column": 25
},
"end": {
"line": 44,
"column": 1
}
},
"body": [
{
"type": "ExpressionStatement",
"start": 514,
"end": 842,
"loc": {
"start": {
"line": 23,
"column": 2
},
"end": {
"line": 34,
"column": 5
}
},
"expression": {
"type": "CallExpression",
"start": 514,
"end": 841,
"loc": {
"start": {
"line": 23,
"column": 2
},
"end": {
"line": 34,
"column": 4
}
},
"callee": {
"type": "Identifier",
"start": 514,
"end": 516,
"loc": {
"start": {
"line": 23,
"column": 2
},
"end": {
"line": 23,
"column": 4
}
},
"name": "it"
},
"arguments": [
{
"type": "Literal",
"start": 517,
"end": 532,
"loc": {
"start": {
"line": 23,
"column": 5
},
"end": {
"line": 23,
"column": 20
}
},
"value": "should render",
"rawValue": "should render",
"raw": "\"should render\""
},
{
"type": "ArrowFunctionExpression",
"start": 534,
"end": 840,
"loc": {
"start": {
"line": 23,
"column": 22
},
"end": {
"line": 34,
"column": 3
}
},
"id": null,
"generator": false,
"expression": false,
"async": false,
"params": [],
"body": {
"type": "BlockStatement",
"start": 540,
"end": 840,
"loc": {
"start": {
"line": 23,
"column": 28
},
"end": {
"line": 34,
"column": 3
}
},
"body": [
{
"type": "VariableDeclaration",
"start": 546,
"end": 582,
"loc": {
"start": {
"line": 24,
"column": 4
},
"end": {
"line": 24,
"column": 40
}
},
"declarations": [
{
"type": "VariableDeclarator",
"start": 550,
"end": 581,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 39
}
},
"id": {
"type": "ObjectPattern",
"start": 550,
"end": 562,
"loc": {
"start": {
"line": 24,
"column": 8
},
"end": {
"line": 24,
"column": 20
}
},
"properties": [
{
"type": "Property",
"start": 552,
"end": 560,
"loc": {
"start": {
"line": 24,
"column": 10
},
"end": {
"line": 24,
"column": 18
}
},
"method": false,
"shorthand": true,
"computed": false,
"key": {
"type": "Identifier",
"start": 552,
"end": 560,
"loc": {
"start": {
"line": 24,
"column": 10
},
"end": {
"line": 24,
"column": 18
}
},
"name": "isTooBig"
},
"kind": "init",
"value": {
"type": "Identifier",
"start": 552,
"end": 560,
"loc": {
"start": {
"line": 24,
"column": 10
},
"end": {
"line": 24,
"column": 18
}
},
"name": "isTooBig"
}
}
]
},
"init": {
"type": "MemberExpression",
"start": 565,
"end": 581,
"loc": {
"start": {
"line": 24,
"column": 23
},
"end": {
"line": 24,
"column": 39
}
},
"object": {
"type": "Identifier",
"start": 565,
"end": 571,
"loc": {
"start": {
"line": 24,
"column": 23
},
"end": {
"line": 24,
"column": 29
}
},
"name": "Header"
},
"property": {
"type": "Identifier",
"start": 572,
"end": 581,
"loc": {
"start": {
"line": 24,
"column": 30
},
"end": {
"line": 24,
"column": 39
}
},
"name": "prototype"
},
"computed": false
}
}
],
"kind": "let",
"trailingComments": [
{
"type": "CommentLine",
"value": " Mock this method",
"start": 592,
"end": 611,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 26,
"column": 23
}
},
"range": [
592,
611
]
}
]
},
{
"type": "ExpressionStatement",
"start": 616,
"end": 655,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 43
}
},
"expression": {
"type": "AssignmentExpression",
"start": 616,
"end": 654,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 42
}
},
"operator": "=",
"left": {
"type": "MemberExpression",
"start": 616,
"end": 641,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 29
}
},
"object": {
"type": "MemberExpression",
"start": 616,
"end": 632,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 20
}
},
"object": {
"type": "Identifier",
"start": 616,
"end": 622,
"loc": {
"start": {
"line": 27,
"column": 4
},
"end": {
"line": 27,
"column": 10
}
},
"name": "Header",
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 623,
"end": 632,
"loc": {
"start": {
"line": 27,
"column": 11
},
"end": {
"line": 27,
"column": 20
}
},
"name": "prototype"
},
"computed": false,
"leadingComments": null
},
"property": {
"type": "Identifier",
"start": 633,
"end": 641,
"loc": {
"start": {
"line": 27,
"column": 21
},
"end": {
"line": 27,
"column": 29
}
},
"name": "isTooBig"
},
"computed": false,
"leadingComments": null
},
"right": {
"type": "ArrowFunctionExpression",
"start": 644,
"end": 654,
"loc": {
"start": {
"line": 27,
"column": 32
},
"end": {
"line": 27,
"column": 42
}
},
"id": null,
"generator": false,
"expression": true,
"async": false,
"params": [],
"body": {
"type": "Literal",
"start": 650,
"end": 654,
"loc": {
"start": {
"line": 27,
"column": 38
},
"end": {
"line": 27,
"column": 42
}
},
"value": true,
"rawValue": true,
"raw": "true"
}
},
"leadingComments": null
},
"leadingComments": [
{
"type": "CommentLine",
"value": " Mock this method",
"start": 592,
"end": 611,
"loc": {
"start": {
"line": 26,
"column": 4
},
"end": {
"line": 26,
"column": 23