mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 02:42:45 +08:00
REFACTOR: Support importing of Pretender
We shouldn't be using global variables for libraries.
This commit is contained in:
parent
f30c5a5c3a
commit
39ad9a4734
|
@ -150,6 +150,9 @@ var define, requirejs;
|
|||
// eslint-disable-next-line
|
||||
default: I18n,
|
||||
},
|
||||
pretender: {
|
||||
default: window.Pretender,
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import User from "discourse/models/user";
|
||||
import Pretender from "pretender";
|
||||
|
||||
export function parsePostData(query) {
|
||||
const result = {};
|
||||
|
|
|
@ -6,6 +6,9 @@
|
|||
//= require ember.debug
|
||||
//= require locales/i18n
|
||||
//= require locales/en_US
|
||||
//= require route-recognizer/dist/route-recognizer
|
||||
//= require fake_xml_http_request
|
||||
//= require pretender/pretender
|
||||
//= require discourse-loader
|
||||
//= require jquery.debug
|
||||
//= require handlebars
|
||||
|
@ -19,9 +22,6 @@
|
|||
//= require_tree ./acceptance
|
||||
//= require_tree ./models
|
||||
//= require_tree ./components
|
||||
//= require fake_xml_http_request
|
||||
//= require route-recognizer/dist/route-recognizer
|
||||
//= require pretender/pretender
|
||||
//= require ./wizard-pretender
|
||||
|
||||
// Trick JSHint into allow document.write
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import Pretender from "pretender";
|
||||
|
||||
// TODO: This file has some copied and pasted functions from `create-pretender` - would be good
|
||||
// to centralize that code at some point.
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user