Skip to content

Commit 761a65e

Browse files
committed
clean up, start docs
1 parent 1a66c8f commit 761a65e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+7486
-3372
lines changed

.travis.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,15 @@ sudo: false
22
os:
33
- linux
44
- osx
5+
- windows
56
language: node_js
67
node_js:
78
- node
9+
- '11'
10+
- '10'
811
- '9'
912
- '8'
1013
- '7'
1114
- '6'
1215
- '5'
1316
- '4'
14-
- '0.12'
15-
- '0.10'

.verb.md

Lines changed: 33 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,19 @@ Parses a comment like this:
1111

1212
```js
1313
/**
14-
* Register a handler function to be called on a node of the given `type`.
15-
* Override a built-in handler `type`, or register a new type.
14+
* Create an instance of `CustomClass` with the given `options`.
1615
*
17-
* ```js
18-
* comments.set('param', function(node) {
19-
* // do stuff to node
20-
* });
21-
* ```
22-
* @param {String} `type` The `node.type` to call the handler on. You can override built-in middleware by registering a handler of the same name, or register a handler for rendering a new type.
23-
* @param {Function} `fn` The handler function
24-
* @return {Object} Returns the instance for chaining.
16+
* @param {String} options
2517
* @api public
2618
*/
2719

28-
set(type, fn) {
29-
// do stuff
20+
class CustomClass {
21+
constructor(options) {
22+
this.options = options;
23+
}
24+
set(type, fn) {
25+
// do stuff
26+
}
3027
}
3128
```
3229

@@ -36,90 +33,40 @@ Into an array of comment objects, like this:
3633
[
3734
{
3835
type: 'BlockComment',
39-
val:
40-
'\nRegister a handler function to be called on a node of the given `type`.\nOverride a built-in handler `type`, or register a new type.\n\n```js\ncomments.set("param", function(node) {\n // do stuff to node\n});\n```\n@param {String} `type` The `node.type` to call the handler on. You can override built-in middleware by registering a handler of the same name, or register a handler for rendering a new type.\n@param {Function} `fn` The handler function\n@return {Object} Returns the instance for chaining.\n@api public',
41-
range: [0, 549],
42-
loc: {
43-
start: {
44-
line: 1,
45-
column: 0
46-
},
47-
end: {
48-
line: 14,
49-
column: 3
50-
}
51-
},
52-
codeStart: 551,
36+
value: '\nCreate an instance of `CustomClass` with the given `options`.\n\n@param {String} options\n@api public',
37+
range: [0, 117],
38+
loc: { start: { line: 1, column: 0 }, end: { line: 6, column: 3 } },
39+
codeStart: 119,
5340
raw:
54-
'*\n * Register a handler function to be called on a node of the given `type`.\n * Override a built-in handler `type`, or register a new type.\n *\n * ```js\n * comments.set("param", function(node) {\n * // do stuff to node\n * });\n * ```\n * @param {String} `type` The `node.type` to call the handler on. You can override built-in middleware by registering a handler of the same name, or register a handler for rendering a new type.\n * @param {Function} `fn` The handler function\n * @return {Object} Returns the instance for chaining.\n * @api public\n ',
41+
'*\n * Create an instance of `CustomClass` with the given `options`.\n *\n * @param {String} options\n * @api public\n ',
5542
code: {
5643
context: {
57-
type: 'method',
58-
ctor: undefined,
59-
name: 'undefinedset',
60-
params: ['type', 'fn'],
61-
string: 'undefinedset()'
44+
type: 'class',
45+
ctor: 'CustomClass',
46+
name: 'CustomClass',
47+
extends: undefined,
48+
string: 'new CustomClass()'
6249
},
63-
val: 'set(type, fn) {',
64-
range: [551, 566],
65-
loc: {
66-
start: {
67-
line: 16,
68-
column: 0
69-
},
70-
end: {
71-
line: 16,
72-
column: 15
73-
}
74-
}
50+
value: 'class CustomClass {',
51+
range: [119, 138],
52+
loc: { start: { line: 8, column: 0 }, end: { line: 8, column: 19 } }
7553
},
76-
description:
77-
'Register a handler function to be called on a node of the given `type`.\nOverride a built-in handler `type`, or register a new type.',
54+
description: 'Create an instance of `CustomClass` with the given `options`.',
7855
footer: '',
79-
examples: [
80-
{
81-
type: 'gfm',
82-
raw: '```js\ncomments.set("param", function(node) {\n // do stuff to node\n});\n```',
83-
description: '',
84-
language: 'js',
85-
val: '\ncomments.set("param", function(node) {\n // do stuff to node\n});\n'
86-
}
87-
],
56+
examples: [],
8857
tags: [
8958
{
9059
title: 'param',
91-
name: 'type',
92-
description:
93-
'The `node.type` to call the handler on. You can override built-in middleware by registering a handler of the same name, or register a handler for rendering a new type.',
94-
type: {
95-
type: 'NameExpression',
96-
name: 'String'
97-
}
98-
},
99-
{
100-
title: 'param',
101-
name: 'fn',
102-
description: 'The handler function',
103-
type: {
104-
type: 'NameExpression',
105-
name: 'Function'
106-
}
107-
},
108-
{
109-
title: 'return',
110-
name: '',
111-
description: 'Returns the instance for chaining.',
112-
type: {
113-
type: 'NameExpression',
114-
name: 'Object'
115-
}
60+
name: 'options',
61+
description: '',
62+
type: { type: 'NameExpression', name: 'String' }
11663
},
117-
{
118-
title: 'api',
119-
name: 'public',
120-
description: ''
121-
}
122-
]
64+
{ title: 'api', name: 'public', description: '' }
65+
],
66+
inlineTags: []
12367
}
12468
]
12569
```
70+
71+
## API
72+
{%= apidocs("index.js") %}

LICENSE

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2014-2018, Jon Schlinkert.
3+
Copyright (c) 2014-present, Jon Schlinkert.
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal
@@ -9,13 +9,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
99
copies of the Software, and to permit persons to whom the Software is
1010
furnished to do so, subject to the following conditions:
1111

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
1414

1515
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1616
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1717
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1818
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1919
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)