npm install simplehar
index.html in your browser or you can use it as a node app.You can also access rafacesar.github.io/simplehar and use it online!
To understand how the information is displayed, check the explanation.
The viewer needs __Bootstrap(+3.0.0)__ and __jQuery(+2.1.0)__ to work.
To install it as a node module you can run:
``shell`
npm install simplehar`
Or globally:shell`
npm install -g simplehar
javascript
var simplehar = require('simplehar'),
path = require('path'),
harFile = path.join('harFolder', 'myHarFile.har'),
htmlFile = path.join('htmlFolder', 'myHtmlFile.html');simplehar({
har:harFile,
html:htmlFile,
lng:false
});
//...html...
var result = simplehar({
har:harFile,
html:htmlFile,
lng:false,
frame:true,
return:true
});
//[
// ...html...,
// ...html...
//]
var result = simplehar({
har:multipleSitesHarFile,
lng:false,
frame:true,
return:true
});
//{
// css:'...',
// js:'...',
// html:'...'
//}
var result = simplehar({
har:harFile,
html:htmlFile,
lng:false,
frame:true,
return:true,
frameContent:{
css:false,
js:false
}
});
//{
// css:'...',
// js:'...',
// html:['...', '...']
//}
var result = simplehar({
har:multipleSitesHarFile,
lng:false,
frame:true,
return:true,
frameContent:{
css:false,
js:false
}
});
`$3
After installed you can simply run:
`shell
node ./node_module/.bin/simplehar
`Or:
`shell
node ./node_module/.bin/simplehar
`Or a complete command:
`shell
node ./node_module/.bin/simplehar lng=pt-BR frame
`Or globally:
`shell
simplehar
`Parameters
$3
Har source to be used as base (it needs the .har extension)$3
Html file to be generate with the har informations (it needs the .html extension)
__Via Command Line:__
>This parameter __will be ignored__ when using multiple sites in one harFile__Via Programmatically (_when using multiple sites_)__
> The string
{id} __will be replaced__ by the id of the page on harFile.
> If the {id}` is __missing__, this parameter __will be ignored__