mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-29 00:38:11 -05:00
Add js.py/strings.py as deps to JS modules.
If either python file changes, we may need to change the compiled JS files. We'll take the conservative approach and always rebuild.
This commit is contained in:
@@ -189,7 +189,7 @@ clean_css:
|
||||
js: $(STATIC_BUILDSTAMP) $(JS_OUTPUTS)
|
||||
|
||||
define JS_MODULE_TEMPLATE
|
||||
$(JS_MODULE_OUTPUTS_$(1)): $(JS_MODULE_DEPS_$(1))
|
||||
$(JS_MODULE_OUTPUTS_$(1)): $(JS_MODULE_DEPS_$(1)) r2/lib/js.py
|
||||
# remove mangled output symlinks, similar to above.
|
||||
rm -f $(JS_MODULE_OUTPUTS_$(1))
|
||||
paster run standalone r2/lib/js.py -c "build_module('$(1)')"
|
||||
|
||||
@@ -36,6 +36,7 @@ try:
|
||||
except ImportError:
|
||||
STATIC_ROOT = None
|
||||
else:
|
||||
REDDIT_ROOT = config["pylons.paths"]["root"]
|
||||
STATIC_ROOT = config["pylons.paths"]["static_files"]
|
||||
|
||||
# STATIC_ROOT will be None if pylons is uninitialized
|
||||
@@ -285,6 +286,11 @@ class LocalizedModule(Module):
|
||||
url = LocalizedModule.languagize_path(self.name, langs[0])
|
||||
return script_tag.format(src=static(url))
|
||||
|
||||
@property
|
||||
def dependencies(self):
|
||||
return (super(LocalizedModule, self).dependencies
|
||||
+ [os.path.join(REDDIT_ROOT, "lib/strings.py")])
|
||||
|
||||
@property
|
||||
def outputs(self):
|
||||
for lang, unused in iter_langs():
|
||||
|
||||
Reference in New Issue
Block a user