Re-construct the JS Timeline page
This commit is contained in:
+8
-11
@@ -1,9 +1,10 @@
|
||||
var Q = require('q');
|
||||
var debug = require('debug')('ylt:runner');
|
||||
var Q = require('q');
|
||||
var debug = require('debug')('ylt:runner');
|
||||
|
||||
var phantomasWrapper = require('./tools/phantomasWrapper');
|
||||
var rulesChecker = require('./rulesChecker');
|
||||
var scoreCalculator = require('./scoreCalculator');
|
||||
var phantomasWrapper = require('./tools/phantomasWrapper');
|
||||
var jsExecutionTransformer = require('./tools/jsExecutionTransformer');
|
||||
var rulesChecker = require('./rulesChecker');
|
||||
var scoreCalculator = require('./scoreCalculator');
|
||||
|
||||
|
||||
var Runner = function(params) {
|
||||
@@ -21,12 +22,8 @@ var Runner = function(params) {
|
||||
phantomasWrapper.execute(data).then(function(phantomasResults) {
|
||||
data.toolsResults.phantomas = phantomasResults;
|
||||
|
||||
// Get the JS Execution Tree from offenders and put in the main object
|
||||
try {
|
||||
data.javascriptExecutionTree = JSON.parse(data.toolsResults.phantomas.offenders.javascriptExecutionTree[0]);
|
||||
} catch(e) {
|
||||
debug('Could not find nor parse phantomas.offenders.javascriptExecutionTree');
|
||||
}
|
||||
// Treat the JS Execution Tree from offenders
|
||||
data.javascriptExecutionTree = jsExecutionTransformer.transform(data);
|
||||
|
||||
// Other tools go here
|
||||
|
||||
|
||||
Reference in New Issue
Block a user