Closed TheDutchCoder closed 8 years ago
Yeh the force: true thing isnt ideal, I'll fix that up with a patch. Not sure how to fail a gulp task gracefully at the moment, so will need to look at that.
Anyway, AccessSniff supports urls so it should be a matter of passing through a url via gulp, which I need to look at. Gulp seems to not like url entries as a file, so will have a think.
Does some like below make sense?
gulp.task('accessSniff-url', function() {
return access({
urls: ['http://statamic.com/'],
force: true,
reportType: 'json',
reportLocation: 'reports/json',
});
});
Right did a quick release to 1.2.0, so try out the above and see what you reckon.
That looks good, I'll give it a try today and will report back!
This works like a charm man, excellent! Is there a way to combine reports and set their filename?
I'm not sure what options you expose right now, but that would be a really nice thing.
I see you use AccessSniff's options, nice! I will see what I can do with that.
Thanks for your time, it's really appreciated!
Well, been thinking about doing that with the report, just been slack with putting it in, if you put in an issue over at yargalot/AccessSniff it'll give me a reason to do it.
With the options, you can pretty much pass in whatever is over at yargalot/AccessSniff as well.
Let me know if there is anything else thats missing, happy to have a look at throwing things in, got a few things I need to fix with it.
But since this issue is all good, I'll close it off :)
Created an issue over at AcessSniff.
On another note: would you be able to make this plugin work in a regular stream?
E.g.
return gulp.src('package.json')
.pipe(plugins.plumber())
.pipe(plugins.accessibility(accessibility.options))
.pipe(plugins.rename('test.txt'))
.pipe(gulp.dest('.tests/wcag'));
Right now I can only run it directly as
plugins.accessibility(accessibility.options)
and I would like to pipe the results to a file (although this might be very much related to the reports issue)
Yeh that should be fine, would just have to return the output in the callback. Will have a look this weekend.
Since the plugin is working now (although it throws an error when you don't specify the "force: true" object), would it be possible to test against URL's?
Right now it's not much use to static site builds, so that would be great!