summaryrefslogtreecommitdiffstats
path: root/build/banner.mjs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-15 11:37:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2023-09-15 11:37:20 +0000
commit22daa00afb1a5d628e0267fba0f062c4f8fb5613 (patch)
treec954c1be5487c69839459d79d74f139e3ae28011 /build/banner.mjs
parentAdding upstream version 5.3.1+dfsg. (diff)
downloadbootstrap-html-fb41729811821d278777ee1cdb76b4117d1e16ec.tar.xz
bootstrap-html-fb41729811821d278777ee1cdb76b4117d1e16ec.zip
Adding upstream version 5.3.2+dfsg.upstream/5.3.2+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--build/banner.mjs (renamed from build/banner.js)11
1 files changed, 8 insertions, 3 deletions
diff --git a/build/banner.js b/build/banner.mjs
index a022f1c..3fea93c 100644
--- a/build/banner.js
+++ b/build/banner.mjs
@@ -1,6 +1,11 @@
-'use strict'
+import fs from 'node:fs/promises'
+import path from 'node:path'
+import { fileURLToPath } from 'node:url'
-const pkg = require('../package.json')
+const __dirname = path.dirname(fileURLToPath(import.meta.url))
+
+const pkgJson = path.join(__dirname, '../package.json')
+const pkg = JSON.parse(await fs.readFile(pkgJson, 'utf8'))
const year = new Date().getFullYear()
@@ -12,4 +17,4 @@ function getBanner(pluginFilename) {
*/`
}
-module.exports = getBanner
+export default getBanner