Add a comment to build.py

This commit is contained in:
Éric Lemoine
2014-04-10 17:58:35 +02:00
parent 6826829786
commit df3319328d

View File

@@ -293,6 +293,11 @@ def build_examples_all_js(t):
@rule(r'\Abuild/examples/(?P<id>.*).json\Z') @rule(r'\Abuild/examples/(?P<id>.*).json\Z')
def examples_star_json(name, match): def examples_star_json(name, match):
def action(t): def action(t):
# It would make more sense to use olx.js as an input file here. We use
# it as an externs file instead to prevent "Cannot read property '*' of
# undefined" error when running examples in "raw" or "whitespace" mode.
# Note that we use the proper way in buildcfg/examples-all.json, which
# is only used to check the examples code using the compiler.
content = json.dumps({ content = json.dumps({
'id': match.group('id'), 'id': match.group('id'),
'inherits': '../../buildcfg/base.json', 'inherits': '../../buildcfg/base.json',