1717
1818
1919class RenderedComponent (object ):
20- def __init__ (self , markup , path_to_source , props , serialized_props , watch_source , bundle , to_static_markup ):
20+ def __init__ (self , markup , path_to_source , props , serialized_props , watch_source_files , bundle , to_static_markup ):
2121 self .markup = markup
2222 self .path_to_source = path_to_source
2323 self .props = props
2424 self .serialized_props = serialized_props
25- self .watch_source = watch_source
25+ self .watch_source_files = watch_source_files
2626 self .bundle = bundle
2727 self .to_static_markup = to_static_markup
2828
@@ -54,7 +54,7 @@ def get_bundle(self):
5454 raise ComponentWasNotBundled (
5555 (
5656 'The component "{path}" was not bundled during the rendering process. '
57- 'Call render_component with `bundle`, `translate`, or `watch_source ` '
57+ 'Call render_component with `bundle`, `translate`, or `watch_source_files ` '
5858 'keyword arguments set to `True` to ensure that it is bundled.'
5959 ).format (path = self .path_to_source )
6060 )
@@ -88,7 +88,7 @@ def render_component(
8888 # Rendering options
8989 path_to_source , props = None , to_static_markup = None ,
9090 # Bundling options
91- bundle = None , translate = None , watch_source = None ,
91+ bundle = None , translate = None , watch_source_files = None ,
9292 # Prop handling
9393 json_encoder = None
9494):
@@ -101,12 +101,12 @@ def render_component(
101101 if not os .path .exists (path_to_source ):
102102 raise ComponentSourceFileNotFound (path_to_source )
103103
104- if watch_source is None :
105- watch_source = settings .WATCH_SOURCE
104+ if watch_source_files is None :
105+ watch_source_files = settings .WATCH_SOURCE_FILES
106106
107107 bundled_component = None
108- if bundle or translate or watch_source :
109- bundled_component = bundle_component (path_to_source , translate = translate , watch_source = watch_source )
108+ if bundle or translate or watch_source_files :
109+ bundled_component = bundle_component (path_to_source , translate = translate , watch_source_files = watch_source_files )
110110 path_to_source = bundled_component .get_assets ()[0 ]['path' ]
111111
112112 if json_encoder is None :
@@ -129,5 +129,5 @@ def render_component(
129129 markup = res .text
130130
131131 return RenderedComponent (
132- markup , path_to_source , props , serialized_props , watch_source , bundled_component , to_static_markup
132+ markup , path_to_source , props , serialized_props , watch_source_files , bundled_component , to_static_markup
133133 )
0 commit comments