#-----------------------------------------------------------------------------# Copyright (c) Anaconda, Inc., and Bokeh Contributors.# All rights reserved.## The full license is in the file LICENSE.txt, distributed with this software.#-----------------------------------------------------------------------------'''To build BokehJS extensions'''#-----------------------------------------------------------------------------# Boilerplate#-----------------------------------------------------------------------------from__future__importannotationsimportlogging# isort:skiplog=logging.getLogger(__name__)#-----------------------------------------------------------------------------# Imports#-----------------------------------------------------------------------------# Standard library importsfromargparseimportNamespace# Bokeh importsfrombokeh.extimportbuild# Bokeh importsfrom..subcommandimportArgument,Subcommand#-----------------------------------------------------------------------------# Globals and constants#-----------------------------------------------------------------------------__all__=("Build",)#-----------------------------------------------------------------------------# Private API#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# General API#-----------------------------------------------------------------------------
[docs]classBuild(Subcommand):''' Build a bokeh extension in the given directory. '''name="build"help="Manage and build a bokeh extension"args=(("base_dir",Argument(metavar="BASE_DIR",type=str,nargs="?",default=".",)),("--rebuild",Argument(action="store_true",help="Ignore all caches and perform a full rebuild",)),("--verbose",Argument(action="store_true",help="Display detailed build information",)),("--debug",Argument(action="store_true",help="Run nodejs in debug mode (use --inspect-brk)",)),)
#-----------------------------------------------------------------------------# Dev API#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Code#-----------------------------------------------------------------------------