File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ import { readFileSync } from "fs" ;
12import { terser } from "rollup-plugin-terser" ;
23import * as meta from "./package.json" ;
34
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+
412function onwarn ( message , warn ) {
513 if ( message . code === "CIRCULAR_DEPENDENCY" ) return ;
614 warn ( message ) ;
@@ -15,7 +23,7 @@ const config = {
1523 format : "umd" ,
1624 indent : false ,
1725 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 } ` ,
1927 globals : Object . assign ( { } , ...Object . keys ( meta . dependencies || { } ) . filter ( key => / ^ d 3 - / . test ( key ) ) . map ( key => ( { [ key ] : "d3" } ) ) )
2028 } ,
2129 plugins : [ ] ,
You can’t perform that action at this time.
0 commit comments