How to use gulp-amphtml-validator - 9 common examples

To help you get started, we’ve selected a few gulp-amphtml-validator examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ampproject / amphtml / validator / gulpjs / sample / gulpfile.js View on Github external
gulp.task('amphtml:validate', () => {
  return gulp.src('../../testdata/feature_tests/*.html')
  // Valide the input and attach the validation result to the "amp" property
  // of the file object.
      .pipe(gulpAmpHtmlValidator.validate())
  // Print the validation results to the console.
      .pipe(gulpAmpHtmlValidator.format())
  // Exit the process with error code (1) if an AMP validation error
  // occurred.
      .pipe(gulpAmpHtmlValidator.failAfterError());
});
github NewbranLTD / generator-ampx / generators / app / templates / tasks / amp.js View on Github external
return () => {
    return gulp.src(page)
      // Validate the input and attach the validation result to the "amp" property
      // of the file object.
      .pipe(gulpAmpValidator.validate())
      // Print the validation results to the console.
      .pipe(gulpAmpValidator.format())
      // Exit the process with error code (1) if an AMP validation error
      // occurred.
      .pipe(gulpAmpValidator.failAfterError());
      // .pipe(gulpAmpValidator.failAfterWarningOrError());
  };
};
github ampproject / amphtml / validator / gulpjs / sample / gulpfile.js View on Github external
gulp.task('amphtml:validate', () => {
  return gulp.src('../../testdata/feature_tests/*.html')
  // Valide the input and attach the validation result to the "amp" property
  // of the file object.
      .pipe(gulpAmpHtmlValidator.validate())
  // Print the validation results to the console.
      .pipe(gulpAmpHtmlValidator.format())
  // Exit the process with error code (1) if an AMP validation error
  // occurred.
      .pipe(gulpAmpHtmlValidator.failAfterError());
});
github NewbranLTD / generator-ampx / generators / app / templates / tasks / amp.js View on Github external
return () => {
    return gulp.src(page)
      // Validate the input and attach the validation result to the "amp" property
      // of the file object.
      .pipe(gulpAmpValidator.validate())
      // Print the validation results to the console.
      .pipe(gulpAmpValidator.format())
      // Exit the process with error code (1) if an AMP validation error
      // occurred.
      .pipe(gulpAmpValidator.failAfterError());
      // .pipe(gulpAmpValidator.failAfterWarningOrError());
  };
};
github NewbranLTD / generator-ampx / generators / app / templates / tasks / amp.js View on Github external
return () => {
    return gulp.src(page)
      // Validate the input and attach the validation result to the "amp" property
      // of the file object.
      .pipe(gulpAmpValidator.validate())
      // Print the validation results to the console.
      .pipe(gulpAmpValidator.format())
      // Exit the process with error code (1) if an AMP validation error
      // occurred.
      .pipe(gulpAmpValidator.failAfterError());
      // .pipe(gulpAmpValidator.failAfterWarningOrError());
  };
};
github ampproject / amphtml / validator / gulpjs / sample / gulpfile.js View on Github external
gulp.task('amphtml:validate', () => {
  return gulp.src('../../testdata/feature_tests/*.html')
  // Valide the input and attach the validation result to the "amp" property
  // of the file object.
      .pipe(gulpAmpHtmlValidator.validate())
  // Print the validation results to the console.
      .pipe(gulpAmpHtmlValidator.format())
  // Exit the process with error code (1) if an AMP validation error
  // occurred.
      .pipe(gulpAmpHtmlValidator.failAfterError());
});
github Ismaestro / ampjucks / gulpfile.js View on Github external
gulp.task('validate', function () {
  return gulp.src('dist/**/*.html')
    .pipe(gulpAmpValidator.validate())
    .pipe(gulpAmpValidator.format())
    .pipe(gulpAmpValidator.failAfterError());
});
github Ismaestro / ampjucks / gulpfile.js View on Github external
gulp.task('validate', function () {
  return gulp.src('dist/**/*.html')
    .pipe(gulpAmpValidator.validate())
    .pipe(gulpAmpValidator.format())
    .pipe(gulpAmpValidator.failAfterError());
});
github Ismaestro / ampjucks / gulpfile.js View on Github external
gulp.task('validate', function () {
  return gulp.src('dist/**/*.html')
    .pipe(gulpAmpValidator.validate())
    .pipe(gulpAmpValidator.format())
    .pipe(gulpAmpValidator.failAfterError());
});

gulp-amphtml-validator

Gulp plugin for the official AMP HTML validator (www.ampproject.org)

Apache-2.0
Latest version published 5 months ago

Package Health Score

76 / 100
Full package analysis