kopia lustrzana https://github.com/OpenDroneMap/WebODM
Now plugins are watched in dev mode
rodzic
8f0a8a8ef1
commit
94ba5257d5
|
@ -94,9 +94,13 @@ def build_plugins():
|
|||
"Cannot generate webpack.config.js for {}, a path is missing: {}".format(plugin, ' '.join(build_paths)))
|
||||
|
||||
# Check for webpack.config.js (if we need to build it)
|
||||
if plugin.path_exists("public/webpack.config.js") and not plugin.path_exists("public/build"):
|
||||
logger.info("Running webpack for {}".format(plugin.get_name()))
|
||||
subprocess.call(['webpack-cli'], cwd=plugin.get_path("public"))
|
||||
if plugin.path_exists("public/webpack.config.js"):
|
||||
if settings.DEV:
|
||||
logger.info("Running webpack with watcher for {}".format(plugin.get_name()))
|
||||
subprocess.Popen(['webpack-cli', '--watch'], cwd=plugin.get_path("public"))
|
||||
elif not plugin.path_exists("public/build"):
|
||||
logger.info("Running webpack for {}".format(plugin.get_name()))
|
||||
subprocess.call(['webpack-cli'], cwd=plugin.get_path("public"))
|
||||
|
||||
|
||||
def register_plugins():
|
||||
|
|
|
@ -77,6 +77,7 @@ case $key in
|
|||
;;
|
||||
--dev)
|
||||
export WO_DEBUG=YES
|
||||
export WO_DEV=YES
|
||||
dev_mode=true
|
||||
shift # past argument
|
||||
;;
|
||||
|
|
|
@ -50,6 +50,7 @@ WORKER_RUNNING = sys.argv[2:3] == ["worker"]
|
|||
|
||||
# SECURITY WARNING: don't run with debug turned on a public facing server!
|
||||
DEBUG = os.environ.get('WO_DEBUG', 'YES') == 'YES' or TESTING
|
||||
DEV = os.environ.get('WO_DEV', 'YES') == 'YES'
|
||||
SESSION_COOKIE_SECURE = CSRF_COOKIE_SECURE = os.environ.get('WO_SSL', 'NO') == 'YES'
|
||||
INTERNAL_IPS = ['127.0.0.1']
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue