Don't include metrics.js on enterprise builds.

It throws an exception when the mixpanel library is not present. This
exception breaks emoji autocomplete, among other things.

(imported from commit 6ae2a69d40282701b8717b60d887836416c85a6c)
This commit is contained in:
Kevin Mehall
2013-11-13 18:28:45 -05:00
parent 372984b56d
commit 15da532faf

View File

@@ -513,7 +513,6 @@ JS_SPECS = {
'js/avatar.js',
'js/settings.js',
'js/tab_bar.js',
'js/metrics.js',
'js/emoji.js',
'js/referral.js'
],
@@ -532,13 +531,18 @@ JS_SPECS = {
},
}
app_srcs = JS_SPECS['app']['source_filenames']
if not DEBUG:
# This file is generated by update-prod-static.
# In dev we fetch individual templates using Ajax.
app_srcs = JS_SPECS['app']['source_filenames']
app_srcs.insert(app_srcs.index('third/handlebars/handlebars.runtime.js') + 1,
'templates/compiled.js')
if MIXPANEL_TOKEN:
# Mixpanel is not used on enterprise and throws an error when the
# library is not included
app_srcs.append('js/metrics.js')
PIPELINE_JS = {} # Now handled in tools/minify-js
PIPELINE_JS_COMPRESSOR = None