filehound 2.0.0-beta → 2.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +37 -11
- package/dist/arrays.d.ts +1 -0
- package/dist/arrays.js +4 -0
- package/dist/file.d.ts +108 -0
- package/dist/file.js +184 -0
- package/dist/filehound.d.ts +322 -0
- package/dist/filehound.js +443 -0
- package/dist/files.d.ts +4 -0
- package/dist/files.js +37 -0
- package/dist/filetype.d.ts +10 -0
- package/dist/filetype.js +9 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +3 -0
- package/dist/matchers.d.ts +297 -0
- package/dist/matchers.js +389 -0
- package/dist/walker/async.d.ts +4 -0
- package/dist/walker/async.js +237 -0
- package/dist/walker/heap.d.ts +7 -0
- package/dist/walker/heap.js +49 -0
- package/dist/walker/sync.d.ts +4 -0
- package/dist/walker/sync.js +66 -0
- package/dist/walker/walk.d.ts +32 -0
- package/dist/walker/walk.js +70 -0
- package/package.json +44 -49
- package/.github/stale.yml +0 -42
- package/.travis.yml +0 -8
- package/CONTRIBUTING.md +0 -8
- package/_config.yml +0 -1
- package/dist/src/arrays.js +0 -15
- package/dist/src/arrays.js.map +0 -1
- package/dist/src/asyncWalker.js +0 -63
- package/dist/src/asyncWalker.js.map +0 -1
- package/dist/src/bind.js +0 -15
- package/dist/src/bind.js.map +0 -1
- package/dist/src/filehound.js +0 -597
- package/dist/src/filehound.js.map +0 -1
- package/dist/src/files.js +0 -60
- package/dist/src/files.js.map +0 -1
- package/dist/src/functions.js +0 -22
- package/dist/src/functions.js.map +0 -1
- package/dist/src/matcher.js +0 -51
- package/dist/src/matcher.js.map +0 -1
- package/dist/src/syncWalker.js +0 -51
- package/dist/src/syncWalker.js.map +0 -1
- package/dist/src/walker/walk.js +0 -68
- package/dist/src/walker/walk.js.map +0 -1
- package/dist/src/walker/walkAsync.js +0 -33
- package/dist/src/walker/walkAsync.js.map +0 -1
- package/dist/src/walker/walkSync.js +0 -21
- package/dist/src/walker/walkSync.js.map +0 -1
- package/dist/src/walker.js +0 -31
- package/dist/src/walker.js.map +0 -1
- package/dist/test/filehound.js +0 -872
- package/dist/test/filehound.js.map +0 -1
- package/dist/test/files.js +0 -29
- package/dist/test/files.js.map +0 -1
- package/docconfig/jsdoc.json +0 -26
- package/docconfig/template/LICENSE +0 -61
- package/docconfig/template/README.md +0 -86
- package/docconfig/template/package.json +0 -22
- package/docconfig/template/publish.js +0 -676
- package/docconfig/template/static/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/docconfig/template/static/fonts/OpenSans-Bold-webfont.svg +0 -1830
- package/docconfig/template/static/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/docconfig/template/static/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/docconfig/template/static/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
- package/docconfig/template/static/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/docconfig/template/static/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/docconfig/template/static/fonts/OpenSans-Italic-webfont.svg +0 -1830
- package/docconfig/template/static/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/docconfig/template/static/fonts/OpenSans-Light-webfont.eot +0 -0
- package/docconfig/template/static/fonts/OpenSans-Light-webfont.svg +0 -1831
- package/docconfig/template/static/fonts/OpenSans-Light-webfont.woff +0 -0
- package/docconfig/template/static/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/docconfig/template/static/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
- package/docconfig/template/static/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/docconfig/template/static/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/docconfig/template/static/fonts/OpenSans-Regular-webfont.svg +0 -1831
- package/docconfig/template/static/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/docconfig/template/static/fonts/OpenSans-Semibold-webfont.eot +0 -0
- package/docconfig/template/static/fonts/OpenSans-Semibold-webfont.svg +0 -1830
- package/docconfig/template/static/fonts/OpenSans-Semibold-webfont.ttf +0 -0
- package/docconfig/template/static/fonts/OpenSans-Semibold-webfont.woff +0 -0
- package/docconfig/template/static/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
- package/docconfig/template/static/fonts/OpenSans-SemiboldItalic-webfont.svg +0 -1830
- package/docconfig/template/static/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
- package/docconfig/template/static/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
- package/docconfig/template/static/scripts/linenumber.js +0 -25
- package/docconfig/template/static/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/docconfig/template/static/scripts/prettify/lang-css.js +0 -2
- package/docconfig/template/static/scripts/prettify/prettify.js +0 -28
- package/docconfig/template/static/styles/jsdoc-default.css +0 -605
- package/docconfig/template/static/styles/prettify-jsdoc.css +0 -111
- package/docconfig/template/static/styles/prettify-tomorrow.css +0 -132
- package/docconfig/template/tmpl/augments.tmpl +0 -10
- package/docconfig/template/tmpl/container.tmpl +0 -183
- package/docconfig/template/tmpl/details.tmpl +0 -143
- package/docconfig/template/tmpl/example.tmpl +0 -2
- package/docconfig/template/tmpl/examples.tmpl +0 -13
- package/docconfig/template/tmpl/exceptions.tmpl +0 -32
- package/docconfig/template/tmpl/layout.tmpl +0 -47
- package/docconfig/template/tmpl/mainpage.tmpl +0 -10
- package/docconfig/template/tmpl/members.tmpl +0 -38
- package/docconfig/template/tmpl/method.tmpl +0 -105
- package/docconfig/template/tmpl/params.tmpl +0 -124
- package/docconfig/template/tmpl/properties.tmpl +0 -108
- package/docconfig/template/tmpl/returns.tmpl +0 -19
- package/docconfig/template/tmpl/source.tmpl +0 -8
- package/docconfig/template/tmpl/tutorial.tmpl +0 -19
- package/docconfig/template/tmpl/type.tmpl +0 -7
- package/docs/FileHound.html +0 -3079
- package/docs/FileHound_modified.html +0 -245
- package/docs/_config.yml +0 -1
- package/docs/filehound.js.html +0 -697
- package/docs/fonts/OpenSans-Bold-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Bold-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-Bold-webfont.woff +0 -0
- package/docs/fonts/OpenSans-BoldItalic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-BoldItalic-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-BoldItalic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Italic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Italic-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-Italic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Light-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Light-webfont.svg +0 -1831
- package/docs/fonts/OpenSans-Light-webfont.woff +0 -0
- package/docs/fonts/OpenSans-LightItalic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-LightItalic-webfont.svg +0 -1835
- package/docs/fonts/OpenSans-LightItalic-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Regular-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Regular-webfont.svg +0 -1831
- package/docs/fonts/OpenSans-Regular-webfont.woff +0 -0
- package/docs/fonts/OpenSans-Semibold-webfont.eot +0 -0
- package/docs/fonts/OpenSans-Semibold-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-Semibold-webfont.ttf +0 -0
- package/docs/fonts/OpenSans-Semibold-webfont.woff +0 -0
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.eot +0 -0
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.svg +0 -1830
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.ttf +0 -0
- package/docs/fonts/OpenSans-SemiboldItalic-webfont.woff +0 -0
- package/docs/global.html +0 -288
- package/docs/index.html +0 -154
- package/docs/scripts/linenumber.js +0 -25
- package/docs/scripts/prettify/Apache-License-2.0.txt +0 -202
- package/docs/scripts/prettify/lang-css.js +0 -2
- package/docs/scripts/prettify/prettify.js +0 -28
- package/docs/styles/jsdoc-default.css +0 -605
- package/docs/styles/prettify-jsdoc.css +0 -111
- package/docs/styles/prettify-tomorrow.css +0 -132
- package/docs.md +0 -164
- package/index.js +0 -1
- package/issue_template.md +0 -6
- package/test/filehound.ts +0 -1076
- package/test/files.ts +0 -29
- package/test/fixtures/custom/failed.txt +0 -0
- package/test/fixtures/custom/passed.txt +0 -0
- package/test/fixtures/deeplyNested/c.json +0 -0
- package/test/fixtures/deeplyNested/d.json +0 -0
- package/test/fixtures/deeplyNested/mydir/e.json +0 -0
- package/test/fixtures/deeplyNested/mydir/mydir2/f.json +0 -0
- package/test/fixtures/deeplyNested/mydir/mydir2/mydir3/mydir4/failed.json +0 -0
- package/test/fixtures/deeplyNested/mydir/mydir2/mydir3/z.json +0 -0
- package/test/fixtures/deeplyNested/mydir/mydir2/y.json +0 -0
- package/test/fixtures/deeplyNestedWithHiddenDir/c.json +0 -0
- package/test/fixtures/deeplyNestedWithHiddenDir/d.json +0 -0
- package/test/fixtures/deeplyNestedWithHiddenDir/mydir/e.json +0 -0
- package/test/fixtures/deeplyNestedWithHiddenDir/mydir/mydir2/f.json +0 -0
- package/test/fixtures/deeplyNestedWithHiddenDir/mydir/mydir2/mydir3/mydir4/.mydir5/.keep +0 -0
- package/test/fixtures/deeplyNestedWithHiddenDir/mydir/mydir2/mydir3/mydir4/failed.json +0 -0
- package/test/fixtures/deeplyNestedWithHiddenDir/mydir/mydir2/mydir3/z.json +0 -0
- package/test/fixtures/deeplyNestedWithHiddenDir/mydir/mydir2/y.json +0 -0
- package/test/fixtures/ext/Dummy.java +0 -0
- package/test/fixtures/ext/Dumpy.go +0 -0
- package/test/fixtures/ext/dummy.json +0 -0
- package/test/fixtures/ext/dummy.txt +0 -0
- package/test/fixtures/justFiles/a.json +0 -0
- package/test/fixtures/justFiles/b.json +0 -0
- package/test/fixtures/justFiles/dummy.txt +0 -0
- package/test/fixtures/mixed/a.json +0 -0
- package/test/fixtures/mixed/aabbcc.json +0 -0
- package/test/fixtures/mixed/ab.json +0 -0
- package/test/fixtures/mixed/z.json +0 -0
- package/test/fixtures/nested/.hidden1/bad.txt +0 -0
- package/test/fixtures/nested/c.json +0 -0
- package/test/fixtures/nested/d.json +0 -0
- package/test/fixtures/nested/mydir/e.json +0 -0
- package/test/fixtures/sizes/10b.txt +0 -0
- package/test/fixtures/sizes/1b.txt +0 -0
- package/test/fixtures/sizes/1k.txt +0 -0
- package/test/fixtures/sizes/2k.txt +0 -0
- package/test/fixtures/visibility/.hidden/.hidden.json +0 -0
- package/test/fixtures/visibility/.hidden/visible.json +0 -3
- package/test/fixtures/visibility/.hidden.json +0 -3
- package/test/fixtures/visibility/visible/.hidden.json +0 -3
- package/test/fixtures/visibility/visible.json +0 -3
- package/test/mocha.opts +0 -4
- package/tsconfig.json +0 -16
- package/tslint.json +0 -44
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var data = obj;
|
|
3
|
-
var self = this;
|
|
4
|
-
?>
|
|
5
|
-
<?js if (data.kind !== 'module') { ?>
|
|
6
|
-
<?js if (data.kind === 'class' && data.classdesc) { ?>
|
|
7
|
-
<h2>Constructor</h2>
|
|
8
|
-
<?js } ?>
|
|
9
|
-
|
|
10
|
-
<h4 class="name" id="<?js= id ?>"><?js= data.attribs + (kind === 'class' ? 'new ' : '') +
|
|
11
|
-
name + (data.signature || '') ?></h4>
|
|
12
|
-
|
|
13
|
-
<?js if (data.summary) { ?>
|
|
14
|
-
<p class="summary"><?js= summary ?></p>
|
|
15
|
-
<?js } ?>
|
|
16
|
-
<?js } ?>
|
|
17
|
-
|
|
18
|
-
<?js if (data.kind !== 'module' && data.description) { ?>
|
|
19
|
-
<div class="description">
|
|
20
|
-
<?js= data.description ?>
|
|
21
|
-
</div>
|
|
22
|
-
<?js } ?>
|
|
23
|
-
|
|
24
|
-
<?js if (data.augments && data.alias && data.alias.indexOf('module:') === 0) { ?>
|
|
25
|
-
<h5>Extends:</h5>
|
|
26
|
-
<?js= self.partial('augments.tmpl', data) ?>
|
|
27
|
-
<?js } ?>
|
|
28
|
-
|
|
29
|
-
<?js if (kind === 'event' && data.type && data.type.names) {?>
|
|
30
|
-
<h5>Type:</h5>
|
|
31
|
-
<ul>
|
|
32
|
-
<li>
|
|
33
|
-
<?js= self.partial('type.tmpl', data.type.names) ?>
|
|
34
|
-
</li>
|
|
35
|
-
</ul>
|
|
36
|
-
<?js } ?>
|
|
37
|
-
|
|
38
|
-
<?js if (data['this']) { ?>
|
|
39
|
-
<h5>This:</h5>
|
|
40
|
-
<ul><li><?js= this.linkto(data['this'], data['this']) ?></li></ul>
|
|
41
|
-
<?js } ?>
|
|
42
|
-
|
|
43
|
-
<?js if (data.params && params.length) { ?>
|
|
44
|
-
<h5>Parameters:</h5>
|
|
45
|
-
<?js= this.partial('params.tmpl', params) ?>
|
|
46
|
-
<?js } ?>
|
|
47
|
-
|
|
48
|
-
<?js= this.partial('details.tmpl', data) ?>
|
|
49
|
-
|
|
50
|
-
<?js if (data.kind !== 'module' && data.requires && data.requires.length) { ?>
|
|
51
|
-
<h5>Requires:</h5>
|
|
52
|
-
<ul><?js data.requires.forEach(function(r) { ?>
|
|
53
|
-
<li><?js= self.linkto(r) ?></li>
|
|
54
|
-
<?js }); ?></ul>
|
|
55
|
-
<?js } ?>
|
|
56
|
-
|
|
57
|
-
<?js if (data.fires && fires.length) { ?>
|
|
58
|
-
<h5>Fires:</h5>
|
|
59
|
-
<ul><?js fires.forEach(function(f) { ?>
|
|
60
|
-
<li><?js= self.linkto(f) ?></li>
|
|
61
|
-
<?js }); ?></ul>
|
|
62
|
-
<?js } ?>
|
|
63
|
-
|
|
64
|
-
<?js if (data.listens && listens.length) { ?>
|
|
65
|
-
<h5>Listens to Events:</h5>
|
|
66
|
-
<ul><?js listens.forEach(function(f) { ?>
|
|
67
|
-
<li><?js= self.linkto(f) ?></li>
|
|
68
|
-
<?js }); ?></ul>
|
|
69
|
-
<?js } ?>
|
|
70
|
-
|
|
71
|
-
<?js if (data.listeners && listeners.length) { ?>
|
|
72
|
-
<h5>Listeners of This Event:</h5>
|
|
73
|
-
<ul><?js listeners.forEach(function(f) { ?>
|
|
74
|
-
<li><?js= self.linkto(f) ?></li>
|
|
75
|
-
<?js }); ?></ul>
|
|
76
|
-
<?js } ?>
|
|
77
|
-
|
|
78
|
-
<?js if (data.exceptions && exceptions.length) { ?>
|
|
79
|
-
<h5>Throws:</h5>
|
|
80
|
-
<?js if (exceptions.length > 1) { ?><ul><?js
|
|
81
|
-
exceptions.forEach(function(r) { ?>
|
|
82
|
-
<li><?js= self.partial('exceptions.tmpl', r) ?></li>
|
|
83
|
-
<?js });
|
|
84
|
-
?></ul><?js } else {
|
|
85
|
-
exceptions.forEach(function(r) { ?>
|
|
86
|
-
<?js= self.partial('exceptions.tmpl', r) ?>
|
|
87
|
-
<?js });
|
|
88
|
-
} } ?>
|
|
89
|
-
|
|
90
|
-
<?js if (data.returns && returns.length) { ?>
|
|
91
|
-
<h5>Returns:</h5>
|
|
92
|
-
<?js if (returns.length > 1) { ?><ul><?js
|
|
93
|
-
returns.forEach(function(r) { ?>
|
|
94
|
-
<li><?js= self.partial('returns.tmpl', r) ?></li>
|
|
95
|
-
<?js });
|
|
96
|
-
?></ul><?js } else {
|
|
97
|
-
returns.forEach(function(r) { ?>
|
|
98
|
-
<?js= self.partial('returns.tmpl', r) ?>
|
|
99
|
-
<?js });
|
|
100
|
-
} } ?>
|
|
101
|
-
|
|
102
|
-
<?js if (data.examples && examples.length) { ?>
|
|
103
|
-
<h5>Example<?js= examples.length > 1? 's':'' ?></h5>
|
|
104
|
-
<?js= this.partial('examples.tmpl', examples) ?>
|
|
105
|
-
<?js } ?>
|
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var params = obj;
|
|
3
|
-
|
|
4
|
-
/* sort subparams under their parent params (like opts.classname) */
|
|
5
|
-
var parentParam = null;
|
|
6
|
-
params.forEach(function(param, i) {
|
|
7
|
-
var paramRegExp;
|
|
8
|
-
|
|
9
|
-
if (!param) {
|
|
10
|
-
return;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
if (parentParam && parentParam.name && param.name) {
|
|
14
|
-
paramRegExp = new RegExp('^(?:' + parentParam.name + '(?:\\[\\])*)\\.(.+)$');
|
|
15
|
-
|
|
16
|
-
if ( paramRegExp.test(param.name) ) {
|
|
17
|
-
param.name = RegExp.$1;
|
|
18
|
-
parentParam.subparams = parentParam.subparams || [];
|
|
19
|
-
parentParam.subparams.push(param);
|
|
20
|
-
params[i] = null;
|
|
21
|
-
}
|
|
22
|
-
else {
|
|
23
|
-
parentParam = param;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
else {
|
|
27
|
-
parentParam = param;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
/* determine if we need extra columns, "attributes" and "default" */
|
|
32
|
-
params.hasAttributes = false;
|
|
33
|
-
params.hasDefault = false;
|
|
34
|
-
params.hasName = false;
|
|
35
|
-
|
|
36
|
-
params.forEach(function(param) {
|
|
37
|
-
if (!param) { return; }
|
|
38
|
-
|
|
39
|
-
if (param.optional || param.nullable || param.variable) {
|
|
40
|
-
params.hasAttributes = true;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
if (param.name) {
|
|
44
|
-
params.hasName = true;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (typeof param.defaultvalue !== 'undefined') {
|
|
48
|
-
params.hasDefault = true;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
?>
|
|
52
|
-
|
|
53
|
-
<table class="params">
|
|
54
|
-
<thead>
|
|
55
|
-
<tr>
|
|
56
|
-
<?js if (params.hasName) {?>
|
|
57
|
-
<th>Name</th>
|
|
58
|
-
<?js } ?>
|
|
59
|
-
|
|
60
|
-
<th>Type</th>
|
|
61
|
-
|
|
62
|
-
<?js if (params.hasAttributes) {?>
|
|
63
|
-
<th>Attributes</th>
|
|
64
|
-
<?js } ?>
|
|
65
|
-
|
|
66
|
-
<?js if (params.hasDefault) {?>
|
|
67
|
-
<th>Default</th>
|
|
68
|
-
<?js } ?>
|
|
69
|
-
|
|
70
|
-
<th class="last">Description</th>
|
|
71
|
-
</tr>
|
|
72
|
-
</thead>
|
|
73
|
-
|
|
74
|
-
<tbody>
|
|
75
|
-
<?js
|
|
76
|
-
var self = this;
|
|
77
|
-
params.forEach(function(param) {
|
|
78
|
-
if (!param) { return; }
|
|
79
|
-
?>
|
|
80
|
-
|
|
81
|
-
<tr>
|
|
82
|
-
<?js if (params.hasName) {?>
|
|
83
|
-
<td class="name"><code><?js= param.name ?></code></td>
|
|
84
|
-
<?js } ?>
|
|
85
|
-
|
|
86
|
-
<td class="type">
|
|
87
|
-
<?js if (param.type && param.type.names) {?>
|
|
88
|
-
<?js= self.partial('type.tmpl', param.type.names) ?>
|
|
89
|
-
<?js } ?>
|
|
90
|
-
</td>
|
|
91
|
-
|
|
92
|
-
<?js if (params.hasAttributes) {?>
|
|
93
|
-
<td class="attributes">
|
|
94
|
-
<?js if (param.optional) { ?>
|
|
95
|
-
<optional><br>
|
|
96
|
-
<?js } ?>
|
|
97
|
-
|
|
98
|
-
<?js if (param.nullable) { ?>
|
|
99
|
-
<nullable><br>
|
|
100
|
-
<?js } ?>
|
|
101
|
-
|
|
102
|
-
<?js if (param.variable) { ?>
|
|
103
|
-
<repeatable><br>
|
|
104
|
-
<?js } ?>
|
|
105
|
-
</td>
|
|
106
|
-
<?js } ?>
|
|
107
|
-
|
|
108
|
-
<?js if (params.hasDefault) {?>
|
|
109
|
-
<td class="default">
|
|
110
|
-
<?js if (typeof param.defaultvalue !== 'undefined') { ?>
|
|
111
|
-
<?js= self.htmlsafe(param.defaultvalue) ?>
|
|
112
|
-
<?js } ?>
|
|
113
|
-
</td>
|
|
114
|
-
<?js } ?>
|
|
115
|
-
|
|
116
|
-
<td class="description last"><?js= param.description ?><?js if (param.subparams) { ?>
|
|
117
|
-
<h6>Properties</h6>
|
|
118
|
-
<?js= self.partial('params.tmpl', param.subparams) ?>
|
|
119
|
-
<?js } ?></td>
|
|
120
|
-
</tr>
|
|
121
|
-
|
|
122
|
-
<?js }); ?>
|
|
123
|
-
</tbody>
|
|
124
|
-
</table>
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var data = obj;
|
|
3
|
-
var props = data.subprops || data.properties;
|
|
4
|
-
|
|
5
|
-
/* sort subprops under their parent props (like opts.classname) */
|
|
6
|
-
var parentProp = null;
|
|
7
|
-
props.forEach(function(prop, i) {
|
|
8
|
-
if (!prop) { return; }
|
|
9
|
-
if ( parentProp && prop.name && prop.name.indexOf(parentProp.name + '.') === 0 ) {
|
|
10
|
-
prop.name = prop.name.substr(parentProp.name.length+1);
|
|
11
|
-
parentProp.subprops = parentProp.subprops || [];
|
|
12
|
-
parentProp.subprops.push(prop);
|
|
13
|
-
props[i] = null;
|
|
14
|
-
}
|
|
15
|
-
else {
|
|
16
|
-
parentProp = prop;
|
|
17
|
-
}
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
/* determine if we need extra columns, "attributes" and "default" */
|
|
21
|
-
props.hasAttributes = false;
|
|
22
|
-
props.hasDefault = false;
|
|
23
|
-
props.hasName = false;
|
|
24
|
-
|
|
25
|
-
props.forEach(function(prop) {
|
|
26
|
-
if (!prop) { return; }
|
|
27
|
-
|
|
28
|
-
if (prop.optional || prop.nullable) {
|
|
29
|
-
props.hasAttributes = true;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
if (prop.name) {
|
|
33
|
-
props.hasName = true;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (typeof prop.defaultvalue !== 'undefined' && !data.isEnum) {
|
|
37
|
-
props.hasDefault = true;
|
|
38
|
-
}
|
|
39
|
-
});
|
|
40
|
-
?>
|
|
41
|
-
|
|
42
|
-
<table class="props">
|
|
43
|
-
<thead>
|
|
44
|
-
<tr>
|
|
45
|
-
<?js if (props.hasName) {?>
|
|
46
|
-
<th>Name</th>
|
|
47
|
-
<?js } ?>
|
|
48
|
-
|
|
49
|
-
<th>Type</th>
|
|
50
|
-
|
|
51
|
-
<?js if (props.hasAttributes) {?>
|
|
52
|
-
<th>Attributes</th>
|
|
53
|
-
<?js } ?>
|
|
54
|
-
|
|
55
|
-
<?js if (props.hasDefault) {?>
|
|
56
|
-
<th>Default</th>
|
|
57
|
-
<?js } ?>
|
|
58
|
-
|
|
59
|
-
<th class="last">Description</th>
|
|
60
|
-
</tr>
|
|
61
|
-
</thead>
|
|
62
|
-
|
|
63
|
-
<tbody>
|
|
64
|
-
<?js
|
|
65
|
-
var self = this;
|
|
66
|
-
props.forEach(function(prop) {
|
|
67
|
-
if (!prop) { return; }
|
|
68
|
-
?>
|
|
69
|
-
|
|
70
|
-
<tr>
|
|
71
|
-
<?js if (props.hasName) {?>
|
|
72
|
-
<td class="name"><code><?js= prop.name ?></code></td>
|
|
73
|
-
<?js } ?>
|
|
74
|
-
|
|
75
|
-
<td class="type">
|
|
76
|
-
<?js if (prop.type && prop.type.names) {?>
|
|
77
|
-
<?js= self.partial('type.tmpl', prop.type.names) ?>
|
|
78
|
-
<?js } ?>
|
|
79
|
-
</td>
|
|
80
|
-
|
|
81
|
-
<?js if (props.hasAttributes) {?>
|
|
82
|
-
<td class="attributes">
|
|
83
|
-
<?js if (prop.optional) { ?>
|
|
84
|
-
<optional><br>
|
|
85
|
-
<?js } ?>
|
|
86
|
-
|
|
87
|
-
<?js if (prop.nullable) { ?>
|
|
88
|
-
<nullable><br>
|
|
89
|
-
<?js } ?>
|
|
90
|
-
</td>
|
|
91
|
-
<?js } ?>
|
|
92
|
-
|
|
93
|
-
<?js if (props.hasDefault) {?>
|
|
94
|
-
<td class="default">
|
|
95
|
-
<?js if (typeof prop.defaultvalue !== 'undefined') { ?>
|
|
96
|
-
<?js= self.htmlsafe(prop.defaultvalue) ?>
|
|
97
|
-
<?js } ?>
|
|
98
|
-
</td>
|
|
99
|
-
<?js } ?>
|
|
100
|
-
|
|
101
|
-
<td class="description last"><?js= prop.description ?><?js if (prop.subprops) { ?>
|
|
102
|
-
<h6>Properties</h6><?js= self.partial('properties.tmpl', prop) ?>
|
|
103
|
-
<?js } ?></td>
|
|
104
|
-
</tr>
|
|
105
|
-
|
|
106
|
-
<?js }); ?>
|
|
107
|
-
</tbody>
|
|
108
|
-
</table>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<?js
|
|
2
|
-
var data = obj || {};
|
|
3
|
-
if (data.description) {
|
|
4
|
-
?>
|
|
5
|
-
<div class="param-desc">
|
|
6
|
-
<?js= description ?>
|
|
7
|
-
</div>
|
|
8
|
-
<?js } ?>
|
|
9
|
-
|
|
10
|
-
<?js if (data.type && data.type.names) {?>
|
|
11
|
-
<dl class="param-type">
|
|
12
|
-
<dt>
|
|
13
|
-
Type
|
|
14
|
-
</dt>
|
|
15
|
-
<dd>
|
|
16
|
-
<?js= this.partial('type.tmpl', data.type.names) ?>
|
|
17
|
-
</dd>
|
|
18
|
-
</dl>
|
|
19
|
-
<?js } ?>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
<section>
|
|
2
|
-
|
|
3
|
-
<header>
|
|
4
|
-
<?js if (children.length > 0) { ?>
|
|
5
|
-
<ul><?js
|
|
6
|
-
var self = this;
|
|
7
|
-
children.forEach(function(t) { ?>
|
|
8
|
-
<li><?js= self.tutoriallink(t.name) ?></li>
|
|
9
|
-
<?js }); ?></ul>
|
|
10
|
-
<?js } ?>
|
|
11
|
-
|
|
12
|
-
<h2><?js= header ?></h2>
|
|
13
|
-
</header>
|
|
14
|
-
|
|
15
|
-
<article>
|
|
16
|
-
<?js= content ?>
|
|
17
|
-
</article>
|
|
18
|
-
|
|
19
|
-
</section>
|