Extension: Port to ESM

This commit is contained in:
Romain Vigier
2023-08-19 19:23:10 +02:00
parent b480820b37
commit 8c7724607e
23 changed files with 587 additions and 549 deletions
+4 -8
View File
@@ -1,16 +1,12 @@
// SPDX-FileCopyrightText: 2022 Romain Vigier <contact AT romainvigier.fr>
// SPDX-License-Identifier: GPL-3.0-or-later
const { extensionUtils } = imports.misc;
const Me = extensionUtils.getCurrentExtension();
/**
* Print a message in debug builds.
*
* @param {string} msg Message to print.
* @param {string} msg Message to print.
*/
function message(msg) {
if (Me.metadata['build-type'] === 'debug')
console.log(`[${Me.metadata.name}] ${msg}`);
export function message(msg) {
if (NTSMetadata['build-type'] === 'debug')
console.log(`[${NTSMetadata.name}] ${msg}`);
}