mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-21 20:55:50 +02:00
Add license headers in js/dist files
By implementing the same approach of rollup.config.js and replicate it in build-plugins.js, individual plugins will display license headers.
This commit is contained in:
@@ -1,10 +1,9 @@
|
||||
const path = require('path')
|
||||
const babel = require('rollup-plugin-babel')
|
||||
const resolve = require('rollup-plugin-node-resolve')
|
||||
const banner = require(path.resolve(__dirname, './banner.js'))
|
||||
|
||||
const pkg = require(path.resolve(__dirname, '../package.json'))
|
||||
const BUNDLE = process.env.BUNDLE === 'true'
|
||||
const year = new Date().getFullYear()
|
||||
|
||||
let fileDest = 'bootstrap.js'
|
||||
const external = ['jquery', 'popper.js']
|
||||
@@ -36,11 +35,7 @@ if (BUNDLE) {
|
||||
module.exports = {
|
||||
input: path.resolve(__dirname, '../js/src/index.js'),
|
||||
output: {
|
||||
banner: `/*!
|
||||
* Bootstrap v${pkg.version} (${pkg.homepage})
|
||||
* Copyright 2011-${year} ${pkg.author}
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/`,
|
||||
banner,
|
||||
file: path.resolve(__dirname, `../dist/js/${fileDest}`),
|
||||
format: 'umd',
|
||||
globals,
|
||||
|
Reference in New Issue
Block a user