Skip to content

Instantly share code, notes, and snippets.

View ryanfitzer's full-sized avatar

Ryan Fitzer ryanfitzer

View GitHub Profile
/**
* Check for common keyboard actions.
*
* @example
* checkInputType( e, 'shift click', fn );
* checkInputType( e, [ 'escape', 'enter' ], fn );
* checkInputType( e, [ 'tab', 'shift tab' ], fn );
*
* @param {Event} e - The event object.
* @param {String|Array} types - The name(s) of the inputs to check.
@ryanfitzer
ryanfitzer / validate-html.js
Created August 21, 2019 18:19
HTML Validator Plugin for Webpack
/**
* HTML Validator Plugin for Webpack
*
* @docs https://html-validate.org
*/
const path = require( 'path' );
const columnify = require( 'columnify' );
const HtmlWebpackPlugin = require( 'html-webpack-plugin' );
const HtmlValidate = require( 'html-validate' ).HtmlValidate;