File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,13 @@ import commonjs from 'rollup-plugin-commonjs';
44import pkg from './package.json' ;
55import 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+ }
714function 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] ;
You can’t perform that action at this time.
0 commit comments