Add experimental support for slimerjs.
Pass the --slimerjs flag to run yslow in slimerjs instead of phantomjs. Closes #544
This commit is contained in:
parent
442d761c97
commit
da5509ae22
|
|
@ -2,6 +2,7 @@ CHANGELOG sitespeed.io
|
|||
|
||||
version 3.0.1
|
||||
------------------------
|
||||
* Add experimental support for running yslow in [SlimerJS](http://www.slimerjs.org) #544
|
||||
|
||||
version 3.0.0
|
||||
------------------------
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@
|
|||
*/
|
||||
var path = require('path'),
|
||||
childProcess = require('child_process'),
|
||||
binPath = require('phantomjs').path,
|
||||
phantomPath = require('phantomjs').path,
|
||||
slimerPath = require('slimerjs').path,
|
||||
util = require('../util/util'),
|
||||
fs = require('fs'),
|
||||
winston = require('winston'),
|
||||
|
|
@ -64,8 +65,16 @@ function analyzeUrl(args, asyncDoneCallback) {
|
|||
var config = args.config;
|
||||
var log = winston.loggers.get('sitespeed.io');
|
||||
|
||||
var binPath = phantomPath;
|
||||
|
||||
// PhantomJS arguments
|
||||
var childArgs = ['--ssl-protocol=any', '--ignore-ssl-errors=yes'];
|
||||
var childArgs = [];
|
||||
|
||||
if (args.slimerjs) {
|
||||
binPath = slimerPath;
|
||||
} else {
|
||||
childArgs.push('--ssl-protocol=any', '--ignore-ssl-errors=yes');
|
||||
}
|
||||
|
||||
if (config.proxy) {
|
||||
childArgs.push('--proxy', config.urlProxyObject.host, '--proxy-type',
|
||||
|
|
|
|||
|
|
@ -151,6 +151,10 @@ var fs = require('fs-extra'),
|
|||
}
|
||||
}
|
||||
},
|
||||
slimerjs: {
|
||||
flag: true,
|
||||
help: 'Use Slimerjs instead of Phantomjs for yslow processing (Experimental).'
|
||||
},
|
||||
ruleSet: {
|
||||
metavar: '<RULE-SET>',
|
||||
default: defaultConfig.ruleSet,
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@
|
|||
"dependencies": {
|
||||
"handlebars": "2.0.x",
|
||||
"phantomjs": "1.9.x",
|
||||
"slimerjs": "0.9.x",
|
||||
"async": "0.9.x",
|
||||
"fast-stats": "0.0.2",
|
||||
"fs-extra": "0.13.x",
|
||||
|
|
|
|||
Loading…
Reference in New Issue