Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: build.py

Issue 5960911785295872: Issue 2271 - Enable documentation for Chrome extensions (Closed)
Patch Set: Created April 4, 2015, 4:42 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build.py
===================================================================
--- a/build.py
+++ b/build.py
@@ -369,10 +369,14 @@
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
kzar 2015/04/05 12:51:41 Maybe instead of this logic we could use a JSdoc c
Sebastian Noack 2015/04/05 13:08:56 This would be kinda nice, because the JSDoc config
kzar 2015/04/05 13:30:51 Wouldn't the logic be pretty simple if we use a co
Sebastian Noack 2015/04/05 13:34:33 The logic here would be reasonable. But the actual
kzar 2015/04/05 15:12:55 Fair enough I suppose.
+ 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 @@
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'
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld