2017-12-11 12:34:08 +00:00
|
|
|
from glob import iglob as glob
|
|
|
|
from itertools import chain
|
|
|
|
|
|
|
|
from tornado.autoreload import watch
|
|
|
|
|
|
|
|
|
|
|
|
# yo dawg, we heard you like generators, so now you can generate generators
|
|
|
|
# with generators
|
|
|
|
def _static_files():
|
|
|
|
return chain.from_iterable(
|
|
|
|
glob(pattern) for pattern in (
|
2017-12-11 16:36:49 +00:00
|
|
|
'static/dist/*.js', 'static/*.css', 'templates/*htm?'
|
2017-12-11 12:34:08 +00:00
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
def watch_static_files():
|
|
|
|
for file in _static_files():
|
|
|
|
watch(file)
|