Rename more es6 files to js
This commit is contained in:
parent
4876884fd1
commit
a11938d58d
|
@ -1,11 +1,11 @@
|
|||
// discourse-skip-module
|
||||
(function() {
|
||||
var ps = require("preload-store").default;
|
||||
var preloadedDataElement = document.getElementById("data-preloaded");
|
||||
var setupData = document.getElementById("data-discourse-setup").dataset;
|
||||
const ps = require("preload-store").default;
|
||||
const preloadedDataElement = document.getElementById("data-preloaded");
|
||||
const setupData = document.getElementById("data-discourse-setup").dataset;
|
||||
|
||||
if (preloadedDataElement) {
|
||||
var preloaded = JSON.parse(preloadedDataElement.dataset.preloaded);
|
||||
const preloaded = JSON.parse(preloadedDataElement.dataset.preloaded);
|
||||
|
||||
Object.keys(preloaded).forEach(function(key) {
|
||||
ps.store(key, JSON.parse(preloaded[key]));
|
||||
|
@ -34,7 +34,7 @@
|
|||
Discourse.start();
|
||||
Discourse.set("assetVersion", setupData.assetVersion);
|
||||
|
||||
let Session = require("discourse/models/session").default;
|
||||
const Session = require("discourse/models/session").default;
|
||||
Session.currentProp(
|
||||
"disableCustomCSS",
|
||||
setupData.disableCustomCss === "true"
|
|
@ -1,5 +1,5 @@
|
|||
// discourse-skip-module
|
||||
(function() {
|
||||
var wizard = require("wizard/wizard").default.create();
|
||||
const wizard = require("wizard/wizard").default.create();
|
||||
wizard.start();
|
||||
})();
|
||||
|
|
|
@ -42,7 +42,12 @@ class DiscourseJsProcessor
|
|||
relative_path.start_with?("app/assets/javascripts/select-kit/") ||
|
||||
relative_path.start_with?("app/assets/javascripts/wizard/") ||
|
||||
relative_path.start_with?("app/assets/javascripts/discourse-common/") ||
|
||||
relative_path.start_with?("app/assets/javascripts/ember-addons/")
|
||||
relative_path.start_with?("app/assets/javascripts/ember-addons/") ||
|
||||
relative_path == "app/assets/javascripts/preload-store.js" ||
|
||||
relative_path == "app/assets/javascripts/preload-application-data.js" ||
|
||||
relative_path == "app/assets/javascripts/wizard-start.js" ||
|
||||
relative_path == "app/assets/javascripts/onpopstate-handler.js" ||
|
||||
relative_path == "app/assets/javascripts/discourse.js"
|
||||
end
|
||||
|
||||
def self.skip_module?(data)
|
||||
|
|
Loading…
Reference in New Issue