mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 11:44:49 +08:00
DEV: Move discourse.js
to app/app.js
(#9545)
This is another thing to get our application in line with what Ember CLI expects.
This commit is contained in:
parent
f15fc0ebf3
commit
056327c0c9
|
@ -5,7 +5,7 @@
|
|||
//= require ./ember-addons/fmt
|
||||
//= require ./polyfills
|
||||
//= require_tree ./select-kit
|
||||
//= require ./discourse
|
||||
//= require ./discourse/app/app
|
||||
//= require ./deprecated
|
||||
|
||||
// Stuff we need to load first
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// ensure Discourse is added as a global
|
||||
(function() {
|
||||
window.Discourse = requirejs("discourse").default;
|
||||
window.Discourse = requirejs("discourse/app").default;
|
||||
})();
|
||||
|
|
|
@ -263,6 +263,14 @@ var define, requirejs;
|
|||
function requireFrom(name, origin) {
|
||||
name = transformForAliases(name);
|
||||
|
||||
if (name === "discourse") {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
"discourse has been moved to `discourse/app` - please update your code"
|
||||
);
|
||||
name = "discourse/app";
|
||||
}
|
||||
|
||||
if (name === "discourse/models/input-validation") {
|
||||
// eslint-disable-next-line no-console
|
||||
console.log(
|
||||
|
|
|
@ -2,7 +2,7 @@ import Session from "discourse/models/session";
|
|||
import KeyValueStore from "discourse/lib/key-value-store";
|
||||
import Store from "discourse/models/store";
|
||||
import DiscourseLocation from "discourse/lib/discourse-location";
|
||||
import Discourse from "discourse";
|
||||
import Discourse from "discourse/app";
|
||||
import SearchService from "discourse/services/search";
|
||||
import TopicTrackingState, {
|
||||
startTracking
|
||||
|
|
|
@ -324,7 +324,14 @@ module Discourse
|
|||
|
||||
ActionView::Base.precompiled_asset_checker = -> logical_path do
|
||||
default_checker[logical_path] ||
|
||||
%w{qunit.js qunit.css test_helper.css test_helper.js wizard/test/test_helper.js}.include?(logical_path)
|
||||
%w{qunit.js
|
||||
qunit.css
|
||||
test_helper.css
|
||||
test_helper.js
|
||||
wizard/test/test_helper.js
|
||||
}.include?(logical_path) ||
|
||||
logical_path =~ /\/node_modules/ ||
|
||||
logical_path =~ /\/dist/
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -52,7 +52,6 @@ class DiscourseJsProcessor
|
|||
preload-application-data
|
||||
wizard-start
|
||||
onpopstate-handler
|
||||
discourse
|
||||
google-tag-manager
|
||||
google-universal-analytics
|
||||
activate-account
|
||||
|
|
Loading…
Reference in New Issue
Block a user