Tom MacWright 3da1ff6dd0 Source-sorting by default (#410)
* Source-sorting by default

Many changes

* Uses a new version of module-deps that exposes a sort key
  we use to sort documentation.
* Adds inference for methods in objects
* Groups events into a separate comment property

* Add jsdoc property. Refs https://github.com/documentationjs/documentation/pull/388#issuecomment-215791547

* Namespaces and paths

* More powerful paths: paths now include name, kind, and scope
* comments now include a 'namespace' property with a formatted namespace

* Fix tests

* Re-ignore fonts

* Nix sourceKey from output

* Pin dependency versions

* Fix module-deps-sortable ref

* Update tests for right deps
2016-04-29 18:09:52 -04:00

278 lines
5.9 KiB
JSON

[
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Apples are red",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 15,
"offset": 14
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 15,
"offset": 14
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 15,
"offset": 14
}
}
},
"tags": [],
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 3,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 6,
"column": 2
}
},
"file": "[path]",
"code": "/**\n * Apples are red\n */\nvar apples = function() {\n return 'red';\n};\n\n/**\n * Bananas are yellow\n */\nvar bananas = function() {\n return 'yellow';\n};\n\n/**\n * Carrots are awesome\n */\nvar carrots = function() {\n return 'awesome';\n};\n"
},
"name": "apples",
"kind": "function",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "apples",
"kind": "function"
}
],
"namespace": "apples"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Bananas are yellow",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 19,
"offset": 18
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 19,
"offset": 18
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 19,
"offset": 18
}
}
},
"tags": [],
"loc": {
"start": {
"line": 8,
"column": 0
},
"end": {
"line": 10,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 11,
"column": 0
},
"end": {
"line": 13,
"column": 2
}
},
"file": "[path]",
"code": "/**\n * Apples are red\n */\nvar apples = function() {\n return 'red';\n};\n\n/**\n * Bananas are yellow\n */\nvar bananas = function() {\n return 'yellow';\n};\n\n/**\n * Carrots are awesome\n */\nvar carrots = function() {\n return 'awesome';\n};\n"
},
"name": "bananas",
"kind": "function",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "bananas",
"kind": "function"
}
],
"namespace": "bananas"
},
{
"description": {
"type": "root",
"children": [
{
"type": "paragraph",
"children": [
{
"type": "text",
"value": "Carrots are awesome",
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 20,
"offset": 19
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 20,
"offset": 19
},
"indent": []
}
}
],
"position": {
"start": {
"line": 1,
"column": 1,
"offset": 0
},
"end": {
"line": 1,
"column": 20,
"offset": 19
}
}
},
"tags": [],
"loc": {
"start": {
"line": 15,
"column": 0
},
"end": {
"line": 17,
"column": 3
}
},
"context": {
"loc": {
"start": {
"line": 18,
"column": 0
},
"end": {
"line": 20,
"column": 2
}
},
"file": "[path]",
"code": "/**\n * Apples are red\n */\nvar apples = function() {\n return 'red';\n};\n\n/**\n * Bananas are yellow\n */\nvar bananas = function() {\n return 'yellow';\n};\n\n/**\n * Carrots are awesome\n */\nvar carrots = function() {\n return 'awesome';\n};\n"
},
"name": "carrots",
"kind": "function",
"members": {
"instance": [],
"static": []
},
"path": [
{
"name": "carrots",
"kind": "function"
}
],
"namespace": "carrots"
}
]