refactor(ags): make custom services global for outside access
This commit is contained in:
parent
070f5345c8
commit
97239557f7
3 changed files with 8 additions and 4 deletions
|
@ -32,7 +32,8 @@
|
|||
"no-useless-escape": ["off"]
|
||||
},
|
||||
"globals": {
|
||||
"ags": "readonly",
|
||||
"Tablet": "readonly",
|
||||
"Pointers": "readonly",
|
||||
"ARGV": "readonly",
|
||||
"imports": "readonly",
|
||||
"print": "readonly",
|
||||
|
|
|
@ -4,6 +4,12 @@ Array.prototype.remove = function (el) { this.splice(this.indexOf(el), 1); };
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
import { exec, execAsync } from 'resource:///com/github/Aylur/ags/utils.js';
|
||||
|
||||
import Tablet from './services/tablet.js';
|
||||
globalThis.Tablet = Tablet;
|
||||
|
||||
import Pointers from './services/pointers.js';
|
||||
globalThis.Pointers = Pointers;
|
||||
|
||||
import closeAll from './js/misc/closer.js';
|
||||
globalThis.closeAll = closeAll;
|
||||
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
import App from 'resource:///com/github/Aylur/ags/app.js';
|
||||
|
||||
// TODO: find a way to not need this?
|
||||
import Pointers from '../../services/pointers.js';
|
||||
|
||||
|
||||
export default () => {
|
||||
Array.from(App.windows)
|
||||
|
|
Loading…
Reference in a new issue