Skip to content

Commit 33d1eee

Browse files
committed
Added documentation to multiple sites
1 parent 5dbc86b commit 33d1eee

File tree

1 file changed

+37
-4
lines changed

1 file changed

+37
-4
lines changed

README.md

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ Or globally:
1919
npm install -g simplehar
2020
```
2121

22-
### Using as a dependency
22+
### Using as a dependency/programmatically
2323
```javascript
2424
var simplehar = require('simplehar'),
2525
path = require('path'),
@@ -43,6 +43,18 @@ var result = simplehar({
4343
});
4444

4545

46+
//[
47+
// <style>...</style>...html...<script>...</script>,
48+
// <style>...</style>...html...<script>...</script>
49+
//]
50+
var result = simplehar({
51+
har:multipleSitesHarFile,
52+
lng:false,
53+
frame:true,
54+
return:true
55+
});
56+
57+
4658
//{
4759
// css:'...',
4860
// js:'...',
@@ -59,6 +71,22 @@ var result = simplehar({
5971
js:false
6072
}
6173
});
74+
75+
//{
76+
// css:'...',
77+
// js:'...',
78+
// html:['...', '...']
79+
//}
80+
var result = simplehar({
81+
har:multipleSitesHarFile,
82+
lng:false,
83+
frame:true,
84+
return:true,
85+
frameContent:{
86+
css:false,
87+
js:false
88+
}
89+
});
6290
```
6391

6492
### Using command line
@@ -88,15 +116,20 @@ Har source to be used as base (it needs the `.har` extension)
88116

89117
### htmlFile (*Optional*)
90118
Html file to be generate with the har informations (it needs the `.html` extension)
119+
__Via Command Line:__
120+
>This parameter __will be ignored__ when using multiple sites in one harFile
121+
122+
__Via Programmatically (_when using multiple sites_)__
123+
> The string `{id}` __will be replaced__ by the id of the page on harFile.
124+
> If the `{id}` is __missing__, this parameter __will be ignored__
91125
92126
### frame (*Optional*)
93127
This option genarate a html file just with the div content, embedding the CSS and JS necessary to viewer work.
94-
95-
This options is good for embedding the html in another page. But the page must already have bootstrap and jQuery loaded.
128+
> This options is good for embedding the html in another page. But the page must already have bootstrap and jQuery loaded.
96129
97130
### lng (*Optional*)
98131
Language used to translate (from src/translate.json) (e.g pt-BR)
99132

100133

101-
### frameContent (*Optional* - *`Used only as dependency`*)
134+
### frameContent (*Optional* - *`Used only as dependency/programmatically`*)
102135
Object specifying if the html should have JS or CSS inline

0 commit comments

Comments
 (0)