diff options
Diffstat (limited to 'build')
| -rw-r--r-- | build/rollup.config.js | 10 | ||||
| -rw-r--r-- | build/stamp.js | 19 |
2 files changed, 9 insertions, 20 deletions
diff --git a/build/rollup.config.js b/build/rollup.config.js index 7cec6ef1c..d6eb0cf5d 100644 --- a/build/rollup.config.js +++ b/build/rollup.config.js @@ -1,7 +1,9 @@ const path = require('path') const babel = require('rollup-plugin-babel') const resolve = require('rollup-plugin-node-resolve') +const pkg = require(path.resolve(__dirname, '../package.json')) const BUNDLE = process.env.BUNDLE === 'true' +const year = new Date().getFullYear() var fileDest = 'bootstrap.js' var external = ['jquery', 'popper.js'] @@ -39,5 +41,11 @@ module.exports = { name: 'bootstrap', external: external, globals: globals, - plugins: plugins + plugins: plugins, + banner: `/*! + * Bootstrap v${pkg.version} (${pkg.homepage}) + * Copyright 2011-${year} ${pkg.author} + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) + */ + ` } diff --git a/build/stamp.js b/build/stamp.js deleted file mode 100644 index 2135c60a3..000000000 --- a/build/stamp.js +++ /dev/null @@ -1,19 +0,0 @@ -const fs = require('fs') -const path = require('path') -const pkg = require(path.resolve(__dirname, '../package.json')) -const year = new Date().getFullYear() - -const pathBoostrap = path.resolve(__dirname, '../dist/js/bootstrap.js') -const pathBootstrapBundle = path.resolve(__dirname, '../dist/js/bootstrap.bundle.js') -const contentFile = fs.readFileSync(pathBoostrap, { encoding: 'UTF8' }) -const contentBundleFile = fs.readFileSync(pathBootstrapBundle, { encoding: 'UTF8' }) - -const stamp = -`/*! - * Bootstrap v${pkg.version} (${pkg.homepage}) - * Copyright 2011-${year} ${pkg.author} - * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) - */ -` -fs.writeFileSync(pathBoostrap, `${stamp}${contentFile}`, { encoding: 'UTF8' }) -fs.writeFileSync(pathBootstrapBundle, `${stamp}${contentBundleFile}`, { encoding: 'UTF8' }) |
