66from traitlets import Bool , Unicode
77
88from jupyter_builder .base_extension_app import BaseExtensionApp
9- from jupyter_builder .core_path import default_core_path
109from jupyter_builder .federated_extensions import build_labextension
1110
1211HERE = os .path .dirname (os .path .abspath (__file__ ))
@@ -22,16 +21,23 @@ class BuildLabExtensionApp(BaseExtensionApp):
2221 source_map = Bool (False , config = True , help = "Generate source maps" )
2322
2423 core_path = Unicode (
25- default_core_path () ,
24+ "" ,
2625 config = True ,
2726 help = "Directory containing core application package.json file" ,
2827 )
2928
29+ core_version = Unicode (
30+ "main" ,
31+ config = True ,
32+ help = "Version of JupyterLab core to use when building (ignored if core-path is set)" ,
33+ )
34+
3035 aliases = { # noqa: RUF012
3136 "static-url" : "BuildLabExtensionApp.static_url" ,
3237 "development" : "BuildLabExtensionApp.development" ,
3338 "source-map" : "BuildLabExtensionApp.source_map" ,
3439 "core-path" : "BuildLabExtensionApp.core_path" ,
40+ "core-version" : "BuildLabExtensionApp.core_version" ,
3541 }
3642
3743 def run_task (self ):
@@ -43,6 +49,7 @@ def run_task(self):
4349 static_url = self .static_url or None ,
4450 source_map = self .source_map ,
4551 core_path = self .core_path or None ,
52+ core_version = self .core_version or None ,
4653 )
4754
4855
0 commit comments