Configure docfx command by system

pull/27/head
Anthony Johnson 9 years ago
parent 307885efb7
commit 9b75431e6e

@ -1,5 +1,6 @@
import re
import os
import platform
import subprocess
import traceback
import shutil
@ -13,6 +14,10 @@ from sphinx.errors import ExtensionError
from .base import PythonMapperBase, SphinxMapperBase
DOCFX_COMMAND = 'docfx'
if platform.system() == 'Windows':
DOCFX_COMMAND = 'docfx.cmd'
# Doc comment patterns
DOC_COMMENT_PATTERN = r'''
\<%(tag)s
@ -68,7 +73,7 @@ class DotNetSphinxMapper(SphinxMapperBase):
all_files.add(_file)
if all_files:
try:
command = ['docfx', 'metadata', '--raw', '--force']
command = [DOCFX_COMMAND, 'metadata', '--raw', '--force']
command.extend(all_files)
proc = subprocess.Popen(
' '.join(command),

Loading…
Cancel
Save