0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-12 00:08:59 +01:00
Bootstrap/build/banner.mjs

21 lines
620 B
JavaScript
Raw Normal View History

2023-08-06 06:37:24 +02:00
import fs from 'node:fs/promises'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
2023-08-06 06:37:24 +02:00
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}
2020-06-16 20:41:47 +02:00
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/`
}
2023-08-06 06:37:24 +02:00
export default getBanner