Skip to content

Commit b3d7ef1

Browse files
committed
Add banner
1 parent e77097f commit b3d7ef1

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

rollup.config.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ import commonjs from 'rollup-plugin-commonjs';
44
import pkg from './package.json';
55
import fs from 'fs';
66

7+
function banner() {
8+
var text = pkg.name + ' v' + pkg.version + '\n';
9+
text += 'Copyright (c) ' + (new Date).getFullYear() + ' Erik Koopmans\n';
10+
text += 'Released under the ' + pkg.license + ' License';
11+
text = '/**\n * ' + text.replace(/\n/g, '\n * ') + '\n */\n';
12+
return { banner: text };
13+
}
714
function license(filename) {
815
filename = filename || './LICENSE';
916
var data = fs.readFileSync(filename).toString();
@@ -25,7 +32,8 @@ export default [
2532
},
2633
plugins: [
2734
resolve(),
28-
commonjs()
35+
commonjs(),
36+
banner()
2937
]
3038
},
3139
// Un-bundled builds.
@@ -48,7 +56,8 @@ export default [
4856
},
4957
plugins: [
5058
resolve(),
51-
commonjs()
59+
commonjs(),
60+
banner()
5261
]
5362
}
5463
];

0 commit comments

Comments
 (0)