mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Add module names for the typedoc, make it work
Mark members with @private for typedoc.
This commit is contained in:
13
gruntfile.js
13
gruntfile.js
@@ -23,13 +23,18 @@ module.exports = function(grunt) {
|
||||
|
||||
// Custom Functions
|
||||
var filterTypeScriptFiles = function(content, srcPath) {
|
||||
var matchRule = /^.*@private/ig;
|
||||
if (matchRule.test(content))
|
||||
{
|
||||
var leadingPrivate = /^.*@private/ig;
|
||||
if (leadingPrivate.test(content)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var blockCommentPrivate = /\/\*\*([^](?!\*\/))*@module([^](?!\*\/))*@private[^]*?\*\//g;
|
||||
if (blockCommentPrivate.test(content)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
var processed = content;
|
||||
processed = processed.replace(/\/\/[\/\s]*@private((.|\s)*?)\/\/[\/\s]*@endprivate/gm, "");
|
||||
processed = processed.replace(/\/\/[\/\s]*@private[^]*?\/\/[\/\s]*?@endprivate/gm, "");
|
||||
return processed;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user