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

Unified Diff: build.py

Issue 4810270182473728: Issue 2231 - Use system JsDoc 3 instead our JsDoc 2 fork (Closed)
Patch Set: Created March 31, 2015, 10:58 a.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,27 +369,11 @@
return
targetDir = args[0]
- toolkit = None
- quiet = False
- for option, value in opts:
- if option in ('-t', '--toolkit'):
- toolkit = value
- elif option in ('-q', '--quiet'):
- quiet = True
-
- if toolkit == None:
- toolkit = os.path.join(baseDir, 'jsdoc-toolkit')
- if not os.path.exists(toolkit):
- subprocess.check_call(['hg', 'clone', 'https://hg.adblockplus.org/jsdoc-toolkit/', toolkit])
-
- command = [os.path.join(toolkit, 'jsrun.js'),
- '-t=' + os.path.join(toolkit, 'templates', 'jsdoc'),
- '-d=' + targetDir,
- '-a',
- '-p',
- '-x=js,jsm',
+ command = ['jsdoc',
+ '--destination', targetDir,
+ '--access', 'all',
os.path.join(baseDir, 'lib')]
- if quiet:
+ if any(opt in ('-q', '--quiet') for opt, _ in opts):
subprocess.check_output(command)
else:
subprocess.check_call(command)
@@ -491,8 +475,7 @@
with addCommand(generateDocs, 'docs') as command:
command.shortDescription = 'Generate documentation (requires node.js)'
- command.description = 'Generate documentation files and write them into the specified directory. This operation requires node.js to be installed.'
- command.addOption('JsDoc Toolkit location', short='t', long='toolkit', value='dir')
+ command.description = 'Generate documentation files and write them into the specified directory. This operation requires JsDoc to be installed.'
Wladimir Palant 2015/03/31 13:13:55 Nit: JsDoc 3
Sebastian Noack 2015/03/31 13:18:16 Done.
command.addOption('Suppress JsDoc Toolkit output', short='q', long='quiet')
command.params = '[options] <directory>'
command.supportedTypes = ('gecko')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld