Proof of concept: Load controller via ES6 module in Discourse

This commit is contained in:
Robin Ward
2014-04-29 20:59:57 -04:00
parent c3ccc3e309
commit a4e30e8f93
8 changed files with 119 additions and 4 deletions

View File

@@ -12,6 +12,9 @@ class DiscourseIIFE < Sprockets::Processor
return data if (path =~ /test\_helper\.js/)
return data if (path =~ /javascripts\/helpers\//)
# Ignore ES6 files
return data if (path =~ /\.es6/)
# Ignore translations
return data if (path =~ /\/translations/)
@@ -23,4 +26,4 @@ class DiscourseIIFE < Sprockets::Processor
"(function () {\n\nvar $ = window.jQuery;\n// IIFE Wrapped Content Begins:\n\n#{data}\n\n// IIFE Wrapped Content Ends\n\n })(this);"
end
end
end