Skip to content

Commit 32b22c9

Browse files
authored
updated read me
1 parent c526b02 commit 32b22c9

File tree

1 file changed

+21
-7
lines changed

1 file changed

+21
-7
lines changed

README.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,33 @@ This package uses [treemap](#https://github.com/evmar/webtreemap) for visualizti
1313
npm install -g lasso-analyzer
1414
```
1515

16-
## Usage ##
16+
## Usage as plugin ##
17+
18+
```js
19+
require('lasso').configure({
20+
...
21+
plugins: [
22+
'lasso-analyzer',
23+
...
24+
]
25+
});
26+
```
27+
Creates lasso-analyze.html in your project directory.
1728

29+
## Usage as CLI ##
1830
1. make the bundlingEnabled flag to true in config.json
1931
``` bash
2032
"bundlingEnabled": true,
2133
"outputDir": "build/static/",
2234
```
2335
2. Bundled file is created under "build/static/" folder. Run the CLI as shown below
36+
37+
```bash
38+
lasso-analyzer <--bundle path-->
39+
```
40+
![webpack bundle analyzer zoomable treemap](/Users/aprathap/Documents/git/lasso-analyzer/example/lasso-analyzer.gif)
41+
For Example:
42+
2443
``` bash
2544
lasso-analyzer build/static/index.js
2645
```
@@ -31,13 +50,8 @@ open lasso-analyze.html
3150
```
3251
4. It shows you a treemap visualization as shown below.
3352

34-
## Command-Line Interface Support ##
35-
36-
``` bash
37-
lasso-analyzer <--bundle file path-->
38-
```
3953

4054
## Issues ##
4155
Free feel to create bug or propose improvements.
4256

43-
57+

0 commit comments

Comments
 (0)