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

grunt-decomment

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-decomment - npm Package Compare versions

Comparing version 0.0.1 to 0.0.2

2

package.json
{
"name": "grunt-decomment",
"version": "0.0.1",
"version": "0.0.2",
"description": "Removes comments from JSON, JavaScript, CSS, HTML, etc.",

@@ -5,0 +5,0 @@ "files": [

@@ -9,13 +9,17 @@ 'use strict';

var files = this.files.filter(function (f) {
if (grunt.file.exists(f.src[0])) {
return true;
}
grunt.log.warn('Source file "' + f.src + '" not found.');
});
var files = this.files.map(function (f) {
var result = {
src: f.orig.src.length ? f.orig.src[0] : '',
dest: f.dest
}
if (grunt.file.exists(result.src)) {
return result;
}
grunt.log.warn('Source file "' + result.src + '" not found.');
return null;
})
.filter(function (f) {
return !!f;
});
if (!files.length) {
return;
}
var type, opt = this.options();

@@ -36,4 +40,3 @@

files.forEach(function (f) {
var src = f.src[0];
var code = grunt.file.read(src);
var code = grunt.file.read(f.src);
var result;

@@ -43,3 +46,3 @@ try {

} catch (e) {
grunt.log.warn("Failed to decomment file '" + src + "'");
grunt.log.warn("Failed to decomment file '" + f.src + "'");
throw e;

@@ -46,0 +49,0 @@ }

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