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: Explicitly mention JsDoc 3 Created March 31, 2015, 1:17 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,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,9 +475,8 @@
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.addOption('Suppress JsDoc Toolkit output', short='q', long='quiet')
+ 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')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld