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

grunt-filesize-report

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

grunt-filesize-report - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

2

package.json
{
"name": "grunt-filesize-report",
"version": "1.0.0",
"version": "1.0.1",
"description": "(Very) simple filesize reporter for grunt. Primary use was to generate a very simple xml format for use by Jenkins plot plugin.",

@@ -5,0 +5,0 @@ "author": {

@@ -27,5 +27,5 @@ var fs = require('fs');

var options = this.options();
options.output = options.output || {};
console.log(options)
if (options.output.console !== false) {
if (options.console !== false) {
var widths = [75,10,10,10];

@@ -44,3 +44,3 @@ var sep = ' ';

if(!options.output.short) {
if(!options.short) {
files.forEach(function (file) {

@@ -55,9 +55,9 @@ grunt.log.writeln(grunt.log.table(widths, [file.filename, sep + file.size.toString(), sep + formatSize(file.kb), sep + formatSize(file.mb)]));

options.output.filename = options.output.folder + '/' + (options.output.filename || 'filesize-' + this.target);
options.filename = options.folder + '/' + (options.filename || 'filesize-' + this.target);
if(options.output.folder) {
grunt.file.mkdir(options.output.folder);
if(options.folder) {
grunt.file.mkdir(options.folder);
}
if (options.output.xml) {
if (options.xml) {
var str = '<filesizes type="'+this.target+'">';

@@ -70,7 +70,7 @@

str += '</filesizes>';
fs.writeFileSync(options.output.filename + '.xml', str);
fs.writeFileSync(options.filename + '.xml', str);
}
if (options.output.json) {
fs.writeFileSync(options.output.filename + '.json',JSON.stringify(files));
if (options.json) {
fs.writeFileSync(options.filename + '.json',JSON.stringify(files));
}

@@ -77,0 +77,0 @@

Sorry, the diff of this file is not supported yet

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