Socket
Socket
Sign inDemoInstall

html-preflight

Package Overview
Dependencies
Maintainers
3
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

html-preflight - npm Package Compare versions

Comparing version 0.3.7 to 0.3.8

.travis.yml

7

lib/plugins/prefixer.js

@@ -15,3 +15,8 @@ 'use strict';

try {
return callback(null, htmlAutoprefixer.process(html, this.cheerioOptions, this.postcssOptions));
var prefixed = htmlAutoprefixer.process(html, this.cheerioOptions, this.postcssOptions);
if (prefixed === '') {
return callback(new Error('Invalid HTML'));
}
return callback(null, prefixed);
} catch (e) {

@@ -18,0 +23,0 @@ return callback(e);

2

package.json
{
"name": "html-preflight",
"version": "0.3.7",
"version": "0.3.8",
"description": "The HTML email preflight process, maximing compression without distortion",

@@ -5,0 +5,0 @@ "main": "index.js",

# html-preflight
[![Build Status](https://travis-ci.org/Rebelmail/html-preflight.svg?branch=master)](https://travis-ci.org/Rebelmail/html-preflight)
[![NPM version](https://badge.fury.io/js/html-preflight.png)](http://badge.fury.io/js/html-preflight)

@@ -4,0 +5,0 @@

@@ -7,2 +7,11 @@ 'use strict';

var plugins = require('../lib/plugins');
var Prefixer = plugins.PrefixerPlugin;
var Uglifier = plugins.UglifierPlugin;
var Minifier = plugins.MinifierPlugin;
var prefixer = new Prefixer();
var uglifier = new Uglifier();
var minifier = new Minifier();
describe('HTMLPreflight', function() {

@@ -53,2 +62,23 @@ describe('#constructor', function() {

});
describe('integration tests', function () {
var preflight;
before(function() {
preflight = new HTMLPreflight()
});
it('raises an error with invalid html', function(done) {
preflight.plugins = [
prefixer.run.bind(prefixer),
uglifier.run.bind(uglifier),
minifier.run.bind(minifier)
]
preflight.run('<htm', function(err, html) {
expect(err).to.exist;
done();
});
});
});
});
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