#-----------------------------------------------------------------------------# Copyright (c) Anaconda, Inc., and Bokeh Contributors.# All rights reserved.## The full license is in the file LICENSE.txt, distributed with this software.#-----------------------------------------------------------------------------'''To initialize BokehJS extensions'''#-----------------------------------------------------------------------------# Boilerplate#-----------------------------------------------------------------------------from__future__importannotationsimportlogging# isort:skiplog=logging.getLogger(__name__)#-----------------------------------------------------------------------------# Imports#-----------------------------------------------------------------------------# Standard library importsfromargparseimportNamespace# Bokeh importsfrombokeh.extimportinit# Bokeh importsfrom..subcommandimportArgument,Subcommand#-----------------------------------------------------------------------------# Globals and constants#-----------------------------------------------------------------------------__all__=("Init",)#-----------------------------------------------------------------------------# Private API#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# General API#-----------------------------------------------------------------------------
[docs]classInit(Subcommand):''' Initialize a directory as a new bokeh extension. '''name="init"help="Initialize a bokeh extension"args=(("base_dir",Argument(metavar="BASE_DIR",type=str,nargs="?",default=".",)),("--interactive",Argument(action="store_true",help="Walk the user through creating an extension",)),("--bokehjs_version",Argument(action="store_true",help="Use a specific version of bokehjs",)),("--debug",Argument(action="store_true",help="Run nodejs in debug mode (use --inspect-brk)",)),)
#-----------------------------------------------------------------------------# Dev API#-----------------------------------------------------------------------------#-----------------------------------------------------------------------------# Code#-----------------------------------------------------------------------------