From 77d6308bca45fe01828527dbf0ad31610f0d4450 Mon Sep 17 00:00:00 2001 From: perry Date: Mon, 9 Jan 2017 13:59:03 -0600 Subject: [PATCH] chore(dgeni): add beta tag support --- scripts/docs/processors/jekyll.js | 4 +++- scripts/docs/tag-defs/tag-defs.js | 4 ++++ scripts/docs/templates/native_menu.template.html | 7 ++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/scripts/docs/processors/jekyll.js b/scripts/docs/processors/jekyll.js index af0e4cc10..0122b7afd 100644 --- a/scripts/docs/processors/jekyll.js +++ b/scripts/docs/processors/jekyll.js @@ -20,7 +20,9 @@ module.exports = function jekyll(renderDocsProcessor) { doc.outputPath = doc.outputPath.toLowerCase().replace(' ', '-'); docs[i].URL = doc.outputPath.replace('docs/v2//', 'docs/v2/') .replace('/index.md', '') - .replace('content/',''); + .replace('content/', ''); + + docs[i].demo = !!docs[i].demo; }); docs.push({ diff --git a/scripts/docs/tag-defs/tag-defs.js b/scripts/docs/tag-defs/tag-defs.js index f4a8afad2..5f01bfa2b 100644 --- a/scripts/docs/tag-defs/tag-defs.js +++ b/scripts/docs/tag-defs/tag-defs.js @@ -1,6 +1,10 @@ module.exports = [ {'name': 'advanced'}, {'name': 'demo'}, + {'name': 'beta', transforms: function(doc, tag, value) { + // make the value true or undefined instead of '' or undefined + return typeof value !== 'undefined'; + }}, {'name': 'usage'}, {'name': 'classes'}, // related classes {'name': 'interfaces'} // related interfaces diff --git a/scripts/docs/templates/native_menu.template.html b/scripts/docs/templates/native_menu.template.html index 33fea1a02..abdcd033c 100644 --- a/scripts/docs/templates/native_menu.template.html +++ b/scripts/docs/templates/native_menu.template.html @@ -1,4 +1,9 @@ -<@ for doc in docs @><@ if doc.URL and doc.private != true @> +<@ for doc in docs @><@ if doc.URL and doc.private != true and doc.beta != true @>
  • <$ doc.name $>
  • <@ endif @><@ endfor @> + +<@ for doc in docs @><@ if doc.URL and doc.private != true and doc.beta == true @> +
  • + <$ doc.name $> β +
  • <@ endif @><@ endfor @>