mirror of
https://github.com/discourse/discourse.git
synced 2024-12-18 23:03:57 +08:00
165a3217c8
This reverts commit 4fe79ccc79
.
35 lines
724 B
JavaScript
35 lines
724 B
JavaScript
import deprecated from "discourse-common/lib/deprecated";
|
|
|
|
export const INPUT_DELAY = 250;
|
|
|
|
let environment = "unknown";
|
|
|
|
export function setEnvironment(e) {
|
|
if (isTesting()) {
|
|
environment = "testing";
|
|
} else {
|
|
environment = e;
|
|
}
|
|
}
|
|
|
|
export function isTesting() {
|
|
return environment === "testing";
|
|
}
|
|
|
|
// Generally means "before we migrated to Ember CLI"
|
|
export function isLegacyEmber() {
|
|
deprecated("`isLegacyEmber()` is now deprecated and always returns false", {
|
|
id: "discourse.is-legacy-ember",
|
|
dropFrom: "3.0.0.beta1",
|
|
});
|
|
return false;
|
|
}
|
|
|
|
export function isDevelopment() {
|
|
return environment === "development";
|
|
}
|
|
|
|
export function isProduction() {
|
|
return environment === "production";
|
|
}
|