Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improvement for constructor overloading and tutorials fix #5

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file modified LICENSE.md
100755 → 100644
Empty file.
Empty file modified template/LICENSE.md
100755 → 100644
Empty file.
4 changes: 4 additions & 0 deletions template/plugins/TSDoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ exports.handlers = {
if (comments) {
e.source = comments.join('\n\n');
}
else {
e.source = "";
return;
}
}

// Search for class declarations and check for generics descriptors
Expand Down
17 changes: 12 additions & 5 deletions template/publish.js
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -463,10 +463,12 @@ function buildNav( members ) {
}

if ( members.tutorials.length ) {

members.tutorials.sort(sort_by('name', true, function(a){return a.toUpperCase()}));
var excRe = new RegExp(env.conf.templates.excludeTutorials, 'i');
members.tutorials.sort(sort_by('title', true, function(a){return a.toUpperCase()}));
members.tutorials.forEach( function ( t ) {

if(excRe.test(t.name)) {
return;
}
nav.tutorial.members.push( tutoriallink( t.name ) );
} );

Expand Down Expand Up @@ -842,11 +844,16 @@ exports.publish = function ( taffyData, opts, tutorials ) {

// tutorials can have only one parent so there is no risk for loops
function saveChildren( node ) {
var excRe = new RegExp(env.conf.templates.excludeTutorials, 'i');
node.children.forEach( function ( child ) {
if(excRe.test(child.name)) {
console.log('Tutorial %s (%s) exclude by templates.excludeTutorials regex', child.title, child.name);
return;
}
generateTutorial( 'tutorial' + child.title, child, helper.tutorialToUrl( child.name ) );
saveChildren( child );
} );
});
}

if( tutorials && tutorials.length>0) saveChildren( tutorials );
if( tutorials && tutorials.children.length > 0) saveChildren( tutorials );
};
Empty file modified template/static/img/glyphicons-halflings-white.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified template/static/img/glyphicons-halflings.png
100755 → 100644
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified template/static/scripts/URI.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/bootstrap-dropdown.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/bootstrap-tab.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/jquery.localScroll.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/jquery.min.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/jquery.scrollTo.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/jquery.sunlight.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/prettify/Apache-License-2.0.txt
100755 → 100644
Empty file.
Empty file modified template/static/scripts/prettify/jquery.min.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/prettify/lang-css.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/prettify/prettify.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/sunlight-plugin.doclinks.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/sunlight-plugin.linenumbers.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/sunlight-plugin.menu.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/sunlight.javascript.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/sunlight.js
100755 → 100644
Empty file.
Empty file modified template/static/scripts/toc.js
100755 → 100644
Empty file.
Empty file modified template/static/styles/darkstrap.css
100755 → 100644
Empty file.
Empty file modified template/static/styles/prettify-tomorrow.css
100755 → 100644
Empty file.
Empty file modified template/static/styles/site.cerulean.css
100755 → 100644
Empty file.
Empty file modified template/static/styles/sunlight.dark.css
100755 → 100644
Empty file.
Empty file modified template/static/styles/sunlight.default.css
100755 → 100644
Empty file.
42 changes: 23 additions & 19 deletions template/tmpl/container.tmpl
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?js
var self = this;
docs.forEach(function(doc, i) {
var doc = docs[0];
var i = 0;
?>

<?js if (doc.kind === 'mainpage' || (doc.kind === 'package')) { ?>
Expand Down Expand Up @@ -31,24 +32,26 @@

<article>
<div class="container-overview">
<?js if (doc.kind === 'module' && doc.module) { ?>
<?js= self.partial('method.tmpl', doc.module) ?>
<?js } ?>

<?js if (doc.kind === 'class') { ?>
<?js= self.partial('method.tmpl', doc) ?>
<?js } else { ?>
<?js if (doc.description) { ?>
<div class="description"><?js= doc.description ?></div>
<?js docs.forEach(function(doc, i) { ?>
<?js if (doc.kind === 'module' && doc.module) { ?>
<?js= self.partial('method.tmpl', doc.module) ?>
<?js } ?>


<?js if (doc.kind === 'class' && doc.comment.indexOf('construct') >= 0) { ?>
<?js= self.partial('method.tmpl', doc) ?>
<?js } else { ?>
<?js if (doc.description) { ?>
<div class="description"><?js= doc.description ?></div>
<?js } ?>



<?js if (doc.examples && doc.examples.length) { ?>
<h3>Example<?js= doc.examples.length > 1? 's':'' ?></h3>
<?js= self.partial('examples.tmpl', doc.examples) ?>
<?js if (doc.examples && doc.examples.length) { ?>
<h3>Example<?js= doc.examples.length > 1? 's':'' ?></h3>
<?js= self.partial('examples.tmpl', doc.examples) ?>
<?js } ?>
<?js } ?>
<?js } ?>
<?js }); ?>
</div>

<?js if (doc.implements) { ?>
Expand Down Expand Up @@ -155,6 +158,7 @@

<?js
var methods = self.find({kind: 'function', memberof: title === 'Global' ? {isUndefined: true} : doc.longname});

if (methods && methods.length && methods.forEach) {
?>
<h3 class="subsection-title">Methods</h3>
Expand Down Expand Up @@ -195,10 +199,10 @@
<?js }); ?></dl>
<?js } ?>

<?js= self.partial('details.tmpl', doc) ?>
<?js docs.forEach(function(doc) { ?>
<?js= self.partial('details.tmpl', doc) ?>
<?js }); ?>
</article>

</section>
<?js } ?>

<?js }); ?>
<?js } ?>
Empty file modified template/tsdoc.json
100755 → 100644
Empty file.