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

amp-validator-prebuilt

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amp-validator-prebuilt

Validator for AMP HTML (www.ampproject.org)

  • 0.1.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

AMP HTML ⚡ Validator

A validator for the AMP HTML format.

This is a very first release, rough on the edges. Fasten your seatbelts.

Prerequisite: Linux Ubuntu 14 or similar, or Mac OS X 10.11.x or later

###Mac OS X

See Building a command-line AMP Validator: Mac OS X.

###Linux

Install these packages using apt-get:

  • npm
  • nodejs
  • openjdk-7-jre
  • protobuf-compiler
  • python-protobuf
  • python2.7

Then, run build.py. It creates dist/validate, a script which can print AMP HTML validation errors to the console.

$ dist/validate
usage: validate <file.html>
$ dist/validate testdata/minimum_valid_amp.html
PASS
$ touch empty.html
$ dist/validate empty.html
FAIL
empty.html:1:0 The mandatory tag 'html doctype' is missing or
incorrect. [MANDATORY_AMP_TAG_MISSING_OR_INCORRECT]
empty.html:1:0 The mandatory tag 'html ⚡ for top-level html' is
missing or incorrect. (see
https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md#ampd)
[MANDATORY_AMP_TAG_MISSING_OR_INCORRECT]
empty.html:1:0 The mandatory tag 'head' is missing or incorrect.
(see
https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md#crps)
[MANDATORY_AMP_TAG_MISSING_OR_INCORRECT]
empty.html:1:0 The mandatory tag 'link rel=canonical' is missing
or incorrect. (see
https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md#canon)
[MANDATORY_AMP_TAG_MISSING_OR_INCORRECT]
empty.html:1:0 The mandatory tag 'meta charset=utf-8' is missing
or incorrect. (see
https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md#chrs)
[MANDATORY_AMP_TAG_MISSING_OR_INCORRECT]
empty.html:1:0 The mandatory tag 'meta name=viewport' is missing
or incorrect. (see
https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md#vprt)
[MANDATORY_AMP_TAG_MISSING_OR_INCORRECT]
empty.html:1:0 The mandatory tag 'body' is missing or incorrect.
(see
https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md#crps)
[MANDATORY_AMP_TAG_MISSING_OR_INCORRECT]
empty.html:1:0 The mandatory tag 'amphtml engine v0.js script' is
missing or incorrect. (see
https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md#scrpt)
[MANDATORY_AMP_TAG_MISSING_OR_INCORRECT]
empty.html:1:0 The mandatory tag 'noscript enclosure for
boilerplate' is missing or incorrect. (see
https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md#boilerplate)
[MANDATORY_AMP_TAG_MISSING_OR_INCORRECT]
empty.html:1:0 The mandatory tag 'boilerplate (js enabled)' is
missing or incorrect. (see
https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md#boilerplate)
[MANDATORY_AMP_TAG_MISSING_OR_INCORRECT]
empty.html:1:0 The mandatory tag 'boilerplate (noscript)' is
missing or incorrect. (see
https://github.com/ampproject/amphtml/blob/master/spec/amp-html-format.md#boilerplate)
[MANDATORY_AMP_TAG_MISSING_OR_INCORRECT]

FAQs

Package last updated on 23 Feb 2016

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