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

Unified Diff: build.py

Issue 30059555: Noissue - remove 'docs' command (Closed) Base URL: https://hg.adblockplus.org/buildtools/file/3472c2a61a4e
Patch Set: Created June 9, 2019, 9:37 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
diff --git a/build.py b/build.py
index bf8962f0317dcc9e62bdac83f7fd5ff659928a34..b5241084b181b82ad2910fb204fc994adc8be6c7 100644
--- a/build.py
+++ b/build.py
@@ -9,8 +9,6 @@ import json
import os
import re
import shutil
-import subprocess
-import sys
from urllib import urlencode
import urllib2
from functools import partial
@@ -286,45 +284,6 @@ def gettranslations(base_dir, project_key, platform, **kwargs):
localeTools.getTranslations(locale_config, basename, project_key)
-@argparse_command(
- valid_platforms={'chrome'},
- arguments=(
- make_argument('target_dir'),
- make_argument('-q', '--quiet', help='Suppress JsDoc output',
- action='store_true', default=False),
- ),
-)
-def docs(base_dir, target_dir, quiet, platform, **kwargs):
- """
- Generate documentation (requires node.js).
-
- Generate documentation files and write them into the specified directory.
- """
- source_dir = os.path.join(base_dir, 'lib')
-
- # JSDoc struggles wih huge objects:
- # https://github.com/jsdoc3/jsdoc/issues/976
- sources = [os.path.join(source_dir, filename)
- for filename in os.listdir(source_dir)
- if filename != 'publicSuffixList.js']
-
- buildtools_path = os.path.dirname(__file__)
- config = os.path.join(buildtools_path, 'jsdoc.conf')
-
- command = ['npm', 'run-script', 'jsdoc', '--', '--destination', target_dir,
- '--configure', config] + sources
- if quiet:
- process = subprocess.Popen(command, stdout=subprocess.PIPE,
- stderr=subprocess.PIPE, cwd=buildtools_path)
- stderr = process.communicate()[1]
- retcode = process.poll()
- if retcode:
- sys.stderr.write(stderr)
- raise subprocess.CalledProcessError(command, retcode)
- else:
- subprocess.check_call(command, cwd=buildtools_path)
-
-
def valid_version_format(value):
if re.search(r'[^\d\.]', value):
raise argparse.ArgumentTypeError('Wrong version number format')
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld