You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the default exported function is identical to init, and returns the same functions as export {init, formatted, analyze}. So, you can `require('rollup-analyzer')` or `require('rollup-analyzer')({limit: 5})` and use the same functions.
15
+
16
+
### rollupAnalyzer.init(options)
14
17
set options to use in analysis (this step is optional)
15
18
-**options***(Object)*
16
19
-**limit** - *optional*
17
20
- type: Number
18
21
- default: `null`
19
22
- description: Limit number of files to output analysis of, sorted by DESC size
23
+
-**filter** - *optional*
24
+
- type: Array | String
25
+
- default: `null`
26
+
- description: Filter to only show imports matching the specified name(s)
20
27
-**root** - *optional*
21
28
- type: String
22
29
- default: `process.cwd()`
23
30
- description: Application directory, used to display file paths relatively
24
31
25
-
### formatted(bundle)
32
+
### rollupAnalyzer.formatted(bundle)
26
33
returns Promise which resolves with well formatted analysis string (for CLI printing)
27
34
-**bundle***(Rollup Bundle)* - *required*
28
35
29
-
### analyze(bundle)
36
+
### rollupAnalyzer.analyze(bundle)
30
37
returns Promise which resolves with array of objects describing each imported file
0 commit comments