Skip to content
This repository has been archived by the owner on Jul 12, 2020. It is now read-only.

Break the build for html fragments in gulp #56

Open
doug-wade opened this issue Jan 6, 2016 · 0 comments
Open

Break the build for html fragments in gulp #56

doug-wade opened this issue Jan 6, 2016 · 0 comments

Comments

@doug-wade
Copy link

I'd like to break the build using gulp-a11y when there are issues building html fragments into angular components in my favorite stack, because there are expected errors, per issue 50. Concretely, I'd like for these two tasks, for [components] and (https://github.com/doug-wade/example-koa-angular/blob/master/gulpfile.js#L41) views to fail, but currently I can only break the build for non-compliant views.

In this comment, you seem to allude to the idea of having a .allyrc file, similar to .babelrc or .eslintrc, while also which seems like a great solution. Something like

» a11y ./components/*.html --config .components.allyrc
» a11y  ./views/*.html

And be able to do the same with the gulp wrapper

var a11y = require('gulp-a11y');

gulp.task('components', function () {
  return gulp.src('./components/*.html')
    .pipe(a11y({
      config: '.components.allyrc' 
    }))
    .pipe(gulp.dest('dist'));
});

gulp.task('views', function () {
  return gulp.src('./views/*.html')
    .pipe(a11y()) // defaults to .allyrc
    .pipe(gulp.dest('dist'));
});

I'd be interested in implementing this feature.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant