This commit is contained in:
2021-03-31 10:44:54 +02:00
parent c0d8904782
commit 960de880ee
4 changed files with 39 additions and 16 deletions

View File

@@ -9,7 +9,6 @@ from watchdog.observers import Observer
from cpl.console.console import Console
from cpl.environment.application_environment_abc import ApplicationEnvironmentABC
from cpl_cli.configuration.build_settings import BuildSettings
from cpl_cli.configuration.project_type_enum import ProjectTypeEnum
from cpl_cli.live_server.live_server_thread import LiveServerThread
@@ -71,7 +70,7 @@ class LiveServerService(FileSystemEventHandler):
def _start(self):
self._start_observer()
self._ls_thread = LiveServerThread(self._src_dir)
self._ls_thread = LiveServerThread(self._src_dir, self._build_settings)
self._ls_thread.start()
self._ls_thread.join()
Console.close()
@@ -81,9 +80,5 @@ class LiveServerService(FileSystemEventHandler):
Starts the CPL live development server
:return:
"""
if self._build_settings.project_type == ProjectTypeEnum.library.value:
Console.error(f'Project cannot be a {ProjectTypeEnum.library.value} to be started')
return
Console.write_line('** CPL live development server is running **')
self._start()