File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change
1
+ import { readFileSync } from "fs" ;
1
2
import { terser } from "rollup-plugin-terser" ;
2
3
import * as meta from "./package.json" ;
3
4
5
+ // Extract copyrights from the LICENSE.
6
+ const copyright = readFileSync ( "./LICENSE" , "utf-8" )
7
+ . split ( / \n / g)
8
+ . filter ( line => / ^ C o p y r i g h t \s + / . test ( line ) )
9
+ . map ( line => line . replace ( / ^ C o p y r i g h t \s + / , "" ) )
10
+ . join ( ", " ) ;
11
+
4
12
function onwarn ( message , warn ) {
5
13
if ( message . code === "CIRCULAR_DEPENDENCY" ) return ;
6
14
warn ( message ) ;
@@ -15,7 +23,7 @@ const config = {
15
23
format : "umd" ,
16
24
indent : false ,
17
25
extend : true ,
18
- banner : `// ${ meta . homepage } v${ meta . version } Copyright ${ ( new Date ) . getFullYear ( ) } ${ meta . author . name } ` ,
26
+ banner : `// ${ meta . homepage } v${ meta . version } Copyright ${ copyright } ` ,
19
27
globals : Object . assign ( { } , ...Object . keys ( meta . dependencies || { } ) . filter ( key => / ^ d 3 - / . test ( key ) ) . map ( key => ( { [ key ] : "d3" } ) ) )
20
28
} ,
21
29
plugins : [ ] ,
You can’t perform that action at this time.
0 commit comments