@@ -19,7 +19,7 @@ Or globally:
1919npm install -g simplehar
2020```
2121
22- ### Using as a dependency
22+ ### Using as a dependency/programmatically
2323``` javascript
2424var 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* )
90118Html 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* )
93127This 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* )
98131Language 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 ` * )
102135Object specifying if the html should have JS or CSS inline
0 commit comments