Skip to content

Commit e843f8f

Browse files
committed
Merge branch 'ICodeMyOwnLife-master'
2 parents 5c414fc + fa435bf commit e843f8f

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

index.d.ts

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
import { Plugin } from "rollup";
2+
3+
declare const analyzer: (options?: AnalyzerOptions) => Plugin;
4+
export default analyzer;
5+
6+
export interface AnalyzerOptions {
7+
stdout?: boolean;
8+
limit?: number;
9+
filter?: string | string[] | ((id: string) => boolean);
10+
root?: string;
11+
hideDeps?: boolean;
12+
showExports?: boolean;
13+
summaryOnly?: boolean;
14+
skipFormatted?: boolean;
15+
writeTo?: (analysisString: string) => void;
16+
transformModuleId?: (id: string) => string;
17+
onAnalysis?: (analysisObject: AnalysisObject) => void;
18+
}
19+
20+
export interface AnalysisObject {
21+
bundleSize: number;
22+
bundleOrigSize: number;
23+
bundleReduction: number;
24+
moduleCount: number;
25+
modules: Module[];
26+
}
27+
28+
export interface Module {
29+
id: string;
30+
size: number;
31+
origSize: number;
32+
dependents: string[];
33+
percent: number;
34+
reduction: number;
35+
usedExports: string[];
36+
unusedExports: string[];
37+
}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,14 @@
22
"name": "rollup-plugin-analyzer",
33
"version": "3.2.2",
44
"description": "Mad metrics for your rollup bundles, know all the things",
5-
"engines" : { "node" : ">=8.0.0" },
5+
"engines": {
6+
"node": ">=8.0.0"
7+
},
68
"main": "index.js",
79
"module": "module.js",
810
"files": [
911
"index.js",
12+
"index.d.ts",
1013
"module.js"
1114
],
1215
"scripts": {

0 commit comments

Comments
 (0)