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

babel-plugin-template-html-minifier

Package Overview
Dependencies
Maintainers
2
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-template-html-minifier - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

7

index.js
const htmlMinifier = require('html-minifier');
const isBuiltinModule = require('is-builtin-module');

@@ -24,2 +25,8 @@ const moduleMains = {};

function bareName(importSource) {
if (isBuiltinModule(importSource)) {
/* Don't rule out possibility that a built-in module could provide an html tag
* but also avoid any additional processing of the module name. */
return importSource;
}
const importOwner = ownerName(importSource);

@@ -26,0 +33,0 @@ const pkgMain = getPkgMain(importOwner);

17

package.json
{
"name": "babel-plugin-template-html-minifier",
"description": "Minify HTML in tagged template strings using html-minifier",
"version": "2.0.0",
"version": "2.0.1",
"main": "index.js",

@@ -26,12 +26,13 @@ "scripts": {

"dependencies": {
"html-minifier": "^3.5.3"
"html-minifier": "^3.5.3",
"is-builtin-module": "^3.0.0"
},
"devDependencies": {
"@babel/core": "^7.0.0-beta.49",
"@polymer/lit-element": "^0.5.1",
"ava": "^1.0.0-beta.4",
"lit-html": "^0.10.0",
"nyc": "^12.0.2",
"xo": "^0.21.1"
"@babel/core": "^7.1.0",
"@polymer/lit-element": "^0.6.1",
"ava": "^1.0.0-beta.8",
"lit-html": "^0.11.4",
"nyc": "^13.1.0",
"xo": "^0.23.0"
}
}

@@ -211,4 +211,4 @@ import test from 'ava';

test('ignore basic calls', t => babelTest(t, {
source: `console.log('hello');`,
result: `console.log('hello');`
source: 'console.log(\'hello\');',
result: 'console.log(\'hello\');'
}));

@@ -338,1 +338,11 @@

}));
test('tolerate built-in modules', t => babelTest(t, {
source: 'const fs = require(\'fs\');',
result: 'const fs = require(\'fs\');',
pluginOptions: {
modules: {
'choo/html': [null]
}
}
}));
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