mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Allow us to use Ember CLI assets in production
This adds an optional ENV variable, `EMBER_CLI_PROD_ASSETS`. If truthy, compiling production assets will be done via Ember CLI and will replace the assets Rails would otherwise use.
This commit is contained in:
@@ -13,6 +13,28 @@ module ApplicationHelper
|
||||
@extra_body_classes ||= Set.new
|
||||
end
|
||||
|
||||
def discourse_config_environment
|
||||
# TODO: Can this come from Ember CLI somehow?
|
||||
{ modulePrefix: "discourse",
|
||||
environment: Rails.env,
|
||||
rootURL: Discourse.base_path,
|
||||
locationType: "auto",
|
||||
historySupportMiddleware: false,
|
||||
EmberENV: {
|
||||
FEATURES: {},
|
||||
EXTEND_PROTOTYPES: { "Date": false },
|
||||
_APPLICATION_TEMPLATE_WRAPPER: false,
|
||||
_DEFAULT_ASYNC_OBSERVERS: true,
|
||||
_JQUERY_INTEGRATION: true
|
||||
},
|
||||
APP: {
|
||||
name: "discourse",
|
||||
version: "#{Discourse::VERSION::STRING} #{Discourse.git_version}",
|
||||
exportApplicationGlobal: true
|
||||
}
|
||||
}.to_json
|
||||
end
|
||||
|
||||
def google_universal_analytics_json(ua_domain_name = nil)
|
||||
result = {}
|
||||
if ua_domain_name
|
||||
|
||||
Reference in New Issue
Block a user