[Pkg-mozext-commits] [adblock-plus] 01/17: Issue 2271 - Enable documentation for Chrome extensions

David Prévot taffit at moszumanska.debian.org
Mon Jun 8 20:50:29 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository adblock-plus.

commit 4f917a589f3c2533dcb5afa47b0580b2f9dfcffd
Author: Sebastian Noack <sebastian at adblockplus.org>
Date:   Sat Apr 4 18:40:16 2015 +0200

    Issue 2271 - Enable documentation for Chrome extensions
---
 build.py | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/build.py b/build.py
index 3d9483f..4927826 100644
--- a/build.py
+++ b/build.py
@@ -369,10 +369,14 @@ def generateDocs(baseDir, scriptName, opts, args, type):
     return
   targetDir = args[0]
 
-  command = ['jsdoc',
-             '--destination', targetDir,
-             '--access', 'all',
-             os.path.join(baseDir, 'lib')]
+  source_dir = os.path.join(baseDir, 'lib')
+  sources = [source_dir]
+
+  # JSDoc struggles wih huge objects: https://github.com/jsdoc3/jsdoc/issues/976
+  if type == 'chrome':
+    sources = [os.path.join(source_dir, filename) for filename in os.listdir(source_dir) if filename != 'publicSuffixList.js']
+
+  command = ['jsdoc', '--destination', targetDir, '--access', 'all'] + sources
   if any(opt in ('-q', '--quiet') for opt, _ in opts):
     process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
     stderr = process.communicate()[1]
@@ -483,7 +487,7 @@ with addCommand(generateDocs, 'docs') as command:
   command.description = 'Generate documentation files and write them into the specified directory. This operation requires JsDoc 3 to be installed.'
   command.addOption('Suppress JsDoc output', short='q', long='quiet')
   command.params = '[options] <directory>'
-  command.supportedTypes = ('gecko')
+  command.supportedTypes = ('gecko', 'chrome')
 
 with addCommand(runReleaseAutomation, 'release') as command:
   command.shortDescription = 'Run release automation'

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/adblock-plus.git



More information about the Pkg-mozext-commits mailing list