Socket
Socket
Sign inDemoInstall

nanachi-compress-loader

Package Overview
Dependencies
13
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.1 to 0.2.0

3

package.json
{
"name": "nanachi-compress-loader",
"version": "0.1.1",
"version": "0.2.0",
"description": "",

@@ -26,4 +26,5 @@ "main": "index.js",

"clean-css": "^4.2.1",
"html-minifier": "^4.0.0",
"uglify-es": "^3.3.9"
}
}
const uglifyJS = require('uglify-es');
const cleanCSS = require('clean-css');
const minifier = require('html-minifier').minify;

@@ -23,6 +24,14 @@ const compress = {

ux: function (code) {
return code;
return this.html.call(this, code);
},
wxml: function (code) {
//TODO: comporess xml file;
html: function (code) {
code = minifier(code, {
collapseWhitespace: true,
minifyCSS: true,
minifyJS: function(code) {
return compress.js(code);
},
removeScriptTypeAttributes: true,
removeTagWhitespace: true
});
return code;

@@ -29,0 +38,0 @@ },

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc