You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (file.isBuffer()) {
return accessSniff
.default(fileUrl(file.path), gulpOptions) // using file-url to convert Windows path to classic file URI
.then(function(response) {
file.contents = new Buffer(JSON.stringify(response));
return callback(null, file);
})
.catch(function(error) {
var error = new Error(error);
return callback(error, file);
});
}
Hey guys, sorry about the delay here, im actually travelling atm so wont be able to get this out till around the 28th. Will release it asap and put some tests around it when i get back.
Problem:
Using this plugin under Windows, the linting fails because PhantomJS just returns
As it seems, PhantomJS doesn't handle full Windows paths like C:\foo\bar\index.html which gets returned from the
file.path
Possible Solution:
I could make it work by hacking https://github.com/yargalot/gulp-accessibility/blob/master/index.js#L33
You could use https://github.com/sindresorhus/file-url
The file path gets converted to something like
file:///C:/foo/bar/index.html
which is fine for PhantomJS.
I haven't tested this conversion on OS X/Linux, but it shouldn't do no harm.
Maybe there a other solutions, it was the easiest way to fix it for me.
The text was updated successfully, but these errors were encountered: