In dev mode expose only relevant sources (#11026)

This commit is contained in:
Andrey 2017-12-09 03:25:16 +02:00 committed by Paulus Schoutsen
parent 1f1115f631
commit 20f1e1609f

View File

@ -299,8 +299,13 @@ def async_setup(hass, config):
hass.data[DATA_JS_VERSION] = js_version = conf.get(CONF_JS_VERSION)
if is_dev:
hass.http.register_static_path(
"/home-assistant-polymer", repo_path, False)
for subpath in ["src", "build-translations", "build-temp", "build",
"hass_frontend", "bower_components", "panels"]:
hass.http.register_static_path(
"/home-assistant-polymer/{}".format(subpath),
os.path.join(repo_path, subpath),
False)
hass.http.register_static_path(
"/static/translations",
os.path.join(repo_path, "build-translations/output"), False)