Various adaptations for Phantomas v2
This commit is contained in:
@@ -65,32 +65,11 @@ var PhantomasWrapper = function() {
|
||||
options.proxy = task.options.proxy;
|
||||
}
|
||||
|
||||
// Output the command line for debugging purpose
|
||||
debug('If you want to reproduce the phantomas task only, copy the following command line:');
|
||||
var optionsString = '';
|
||||
for (var opt in options) {
|
||||
var value = options[opt];
|
||||
|
||||
if ((typeof value === 'string' || value instanceof String) && value.indexOf(' ') >= 0) {
|
||||
value = '"' + value + '"';
|
||||
}
|
||||
|
||||
if (value === true) {
|
||||
optionsString += ' ' + '--' + opt;
|
||||
} else if (value === false || value === null || value === undefined) {
|
||||
// Nothing
|
||||
} else {
|
||||
optionsString += ' ' + '--' + opt + '=' + value;
|
||||
}
|
||||
|
||||
}
|
||||
debug('node node_modules/phantomas/bin/phantomas.js --url=' + task.url + optionsString + ' --verbose');
|
||||
|
||||
|
||||
// It's time to launch the test!!!
|
||||
|
||||
const promise = phantomas(task.url, {
|
||||
'analyze-css': true
|
||||
'analyze-css': true,
|
||||
'screenshot': true
|
||||
});
|
||||
|
||||
// handle the promise
|
||||
|
||||
Reference in New Issue
Block a user