diff --git a/.jshintrc b/.jshintrc index ad107e4eef2..74450971d74 100644 --- a/.jshintrc +++ b/.jshintrc @@ -72,6 +72,5 @@ "white": false, "eqnull": true, "quotmark": false, - "lastsemic": true, - "esnext": true + "lastsemic": true } diff --git a/Gemfile b/Gemfile index 777eeaa2adc..f6df068e2a2 100644 --- a/Gemfile +++ b/Gemfile @@ -139,7 +139,6 @@ gem 'rest-client' gem 'rinku' gem 'sanitize' gem 'sass' -gem 'es6_module_transpiler-rails' gem 'sidekiq' gem 'sidekiq-failures' diff --git a/Gemfile.lock b/Gemfile.lock index eef0327414d..76dc5c8b73c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -83,8 +83,6 @@ GEM ember-source (1.6.0.beta.2) handlebars-source (~> 1.0) erubis (2.7.0) - es6_module_transpiler-rails (0.4.0) - execjs eventmachine (1.0.3) excon (0.28.0) execjs (2.0.2) @@ -403,7 +401,6 @@ DEPENDENCIES email_reply_parser-discourse ember-rails ember-source (= 1.6.0.beta.2) - es6_module_transpiler-rails eventmachine fabrication fakeweb (~> 1.3.0) diff --git a/app/assets/javascripts/discourse/controllers/history.js.es6 b/app/assets/javascripts/discourse/controllers/history_controller.js similarity index 97% rename from app/assets/javascripts/discourse/controllers/history.js.es6 rename to app/assets/javascripts/discourse/controllers/history_controller.js index 9e458cde97d..e992ee2c3c8 100644 --- a/app/assets/javascripts/discourse/controllers/history.js.es6 +++ b/app/assets/javascripts/discourse/controllers/history_controller.js @@ -7,7 +7,7 @@ @uses Discourse.ModalFunctionality @module Discourse **/ -export default Discourse.ObjectController.extend(Discourse.ModalFunctionality, { +Discourse.HistoryController = Discourse.ObjectController.extend(Discourse.ModalFunctionality, { loading: false, viewMode: "side_by_side", revisionsTextKey: "post.revisions.controls.comparing_previous_to_current_out_of_total", diff --git a/app/assets/javascripts/discourse/ember/resolver.js b/app/assets/javascripts/discourse/ember/resolver.js index a28574b290e..f2f8dc848e4 100644 --- a/app/assets/javascripts/discourse/ember/resolver.js +++ b/app/assets/javascripts/discourse/ember/resolver.js @@ -1,4 +1,3 @@ -/* global requirejs, require */ /** A custom resolver to allow template names in the format we like. @@ -9,17 +8,6 @@ **/ Discourse.Resolver = Ember.DefaultResolver.extend({ - resolveController: function(parsedName) { - var moduleName = "discourse/controllers/" + parsedName.fullNameWithoutType, - module = requirejs.entries[moduleName]; - - if (module) { - module = require(moduleName, null, null, true /* force sync */); - if (module && module['default']) { module = module['default']; } - } - return module || this._super(parsedName); - }, - /** Attaches a view and wires up the container properly diff --git a/app/assets/javascripts/vendor.js b/app/assets/javascripts/vendor.js index 2b0eba8b019..4a8d64d41fc 100644 --- a/app/assets/javascripts/vendor.js +++ b/app/assets/javascripts/vendor.js @@ -5,9 +5,9 @@ //= require jquery_include.js //= require ember_include.js -//= require loader //= require message-bus //= require jquery.ui.widget.js +//= require_tree ./discourse/ember //= require LAB.js //= require Markdown.Converter.js //= require better_markdown.js @@ -38,4 +38,3 @@ //= require lock-on.js //= require ember-cloaking //= require break_string -//= require_tree ./discourse/ember diff --git a/lib/discourse_iife.rb b/lib/discourse_iife.rb index 6fe24cfeba4..c6a1488d60e 100644 --- a/lib/discourse_iife.rb +++ b/lib/discourse_iife.rb @@ -12,9 +12,6 @@ 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/) @@ -26,4 +23,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 \ No newline at end of file diff --git a/vendor/assets/javascripts/loader.js b/vendor/assets/javascripts/loader.js deleted file mode 100644 index eaee097c7d7..00000000000 --- a/vendor/assets/javascripts/loader.js +++ /dev/null @@ -1,94 +0,0 @@ -var define, requireModule, require, requirejs; - -(function() { - var registry = {}, seen = {}, state = {}; - var FAILED = false; - - define = function(name, deps, callback) { - registry[name] = { - deps: deps, - callback: callback - }; - }; - - function reify(deps, name, seen) { - var length = deps.length; - var reified = new Array(length); - var dep; - var exports; - - for (var i = 0, l = length; i < l; i++) { - dep = deps[i]; - if (dep === 'exports') { - exports = reified[i] = seen; - } else { - reified[i] = require(resolve(dep, name)); - } - } - - return { - deps: reified, - exports: exports - }; - } - - requirejs = require = requireModule = function(name) { - if (state[name] !== FAILED && - seen.hasOwnProperty(name)) { - return seen[name]; - } - - if (!registry[name]) { - throw new Error('Could not find module ' + name); - } - - var mod = registry[name]; - var reified; - var module; - var loaded = false; - - seen[name] = { }; // placeholder for run-time cycles - - try { - reified = reify(mod.deps, name, seen[name]); - module = mod.callback.apply(this, reified.deps); - loaded = true; - } finally { - if (!loaded) { - state[name] = FAILED; - } - } - - return reified.exports ? seen[name] : (seen[name] = module); - }; - - function resolve(child, name) { - if (child.charAt(0) !== '.') { return child; } - - var parts = child.split('/'); - var nameParts = name.split('/'); - var parentBase; - - if (nameParts.length === 1) { - parentBase = nameParts; - } else { - parentBase = nameParts.slice(0, -1); - } - - for (var i = 0, l = parts.length; i < l; i++) { - var part = parts[i]; - - if (part === '..') { parentBase.pop(); } - else if (part === '.') { continue; } - else { parentBase.push(part); } - } - - return parentBase.join('/'); - } - - requirejs.entries = requirejs._eak_seen = registry; - requirejs.clear = function(){ - requirejs.entries = requirejs._eak_seen = registry = {}; - seen = state = {}; - }; -})();