Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gulp-amphtml-validator

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gulp-amphtml-validator

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

  • 1.0.8
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Gulp AMPHTML Validator

A Gulp plugin for validating AMPHTML files using the official AMPHTML Validator.

Installation

Install package with npm and add it to your development dependencies:

npm install --save-dev gulp-amphtml-validator

Usage

const gulpAmpValidator = require('gulp-amphtml-validator');

gulp.task('amphtml:validate', () => {
  return (
    gulp
      .src('*.html')
      // 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())
  );
});

To treat warnings as errors, replace the last line of the validation closure with:

// Exit the process with error code (1) if an AMP validation warning or
// error occurred.
.pipe(gulpAmpValidator.failAfterWarningOrError());

Release Notes

1.0.6

  • Use fancy-log log.info (#30744)

1.0.5

  • Update repository location.

1.0.4

  • Update amphtml-validator dependency to 1.0.30, gulp to 4.0.2 and mocha to 7.0.1.

1.0.3

  • Remove engine section from package.json to allow any version of gulpjs.

1.0.2

  • Add failAfterWarningOrError option
  • Upgrade amphtml-validator version to 1.0.21

1.0.1

  • Upgrade amphtml-validator version to 1.0.18

1.0.0

  • initial release

Keywords

FAQs

Package last updated on 23 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc