REFACTOR: Move Mousetrap library to an import

This commit is contained in:
Robin Ward 2020-08-27 16:16:58 -04:00
parent a3577435f7
commit 96edb7da38
4 changed files with 8 additions and 3 deletions

View File

@ -25,6 +25,10 @@ define("bootbox", ["exports"], function(__exports__) {
__exports__.default = window.bootbox;
});
define("mousetrap", ["exports"], function(__exports__) {
__exports__.default = window.Mousetrap;
});
define("@popperjs/core", ["exports"], function(__exports__) {
__exports__.default = window.Popper;
__exports__.createPopper = window.Popper.createPopper;

View File

@ -1,6 +1,6 @@
/*global Mousetrap:true*/
import Application from "@ember/application";
import { buildResolver } from "discourse-common/resolver";
import Mousetrap from "mousetrap";
const _pluginCallbacks = [];

View File

@ -2,7 +2,8 @@ import I18n from "I18n";
import { debounce, later, next, schedule, scheduleOnce } from "@ember/runloop";
import { inject as service } from "@ember/service";
import Component from "@ember/component";
/*global Mousetrap:true */
import Mousetrap from "mousetrap";
import discourseComputed, {
on,
observes

View File

@ -1,5 +1,5 @@
/*global Mousetrap:true*/
import KeyboardShortcuts from "discourse/lib/keyboard-shortcuts";
import Mousetrap from "mousetrap";
export default {
name: "keyboard-shortcuts",