Safety checks for required apps.

This commit is contained in:
Nick Brassel
2023-05-01 17:23:46 +10:00
parent bdcf3c69c9
commit 6e2d02852c
3 changed files with 22 additions and 3 deletions

View File

@ -251,9 +251,9 @@ const sidebars = {
type: 'category',
label: "Past Breaking Changes",
link: {
type: 'generated-index',
title: 'Past Breaking Changes',
slug: '/breaking_changes/all',
type: 'generated-index',
title: 'Past Breaking Changes',
slug: '/breaking_changes/all',
},
items: [
{

View File

@ -1,5 +1,6 @@
"""Serve QMK documentation locally
"""
import shutil
from qmk.docs import prepare_docs_build_area, run_docs_command
from milc import cli
@ -9,5 +10,14 @@ from milc import cli
def docs(cli):
"""Spin up a local HTTP server for the QMK docs.
"""
if not shutil.which('doxygen'):
cli.log.error('doxygen is not installed. Please install it and try again.')
return
if not shutil.which('npm'):
cli.log.error('npm is not installed. Please install it and try again.')
return
prepare_docs_build_area()
run_docs_command('start', False)

View File

@ -1,5 +1,6 @@
"""Build QMK documentation locally
"""
import shutil
from qmk.docs import prepare_docs_build_area, run_docs_command, BUILD_DOCS_PATH
from milc import cli
@ -14,6 +15,14 @@ def generate_docs(cli):
* [ ] Add a real build step... something static docs
"""
if not shutil.which('doxygen'):
cli.log.error('doxygen is not installed. Please install it and try again.')
return
if not shutil.which('npm'):
cli.log.error('npm is not installed. Please install it and try again.')
return
prepare_docs_build_area()
cli.log.info('Building docusaurus docs')