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-upstream.tar.xz
bootstrap-html-upstream.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 'build/banner.mjs')
-rw-r--r--build/banner.mjs20
1 files changed, 20 insertions, 0 deletions
diff --git a/build/banner.mjs b/build/banner.mjs
new file mode 100644
index 0000000..3fea93c
--- /dev/null
+++ b/build/banner.mjs
@@ -0,0 +1,20 @@
+import fs from 'node:fs/promises'
+import path from 'node:path'
+import { fileURLToPath } from 'node:url'
+
+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()
+
+function getBanner(pluginFilename) {
+ return `/*!
+ * Bootstrap${pluginFilename ? ` ${pluginFilename}` : ''} v${pkg.version} (${pkg.homepage})
+ * Copyright 2011-${year} ${pkg.author}
+ * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
+ */`
+}
+
+export default getBanner