rollup-plugin-filesize
Advanced tools
Comparing version 6.2.1 to 7.0.0
@@ -89,2 +89,6 @@ 'use strict'; | ||
}).filter(function (currentBundle) { | ||
if (currentBundle.hasOwnProperty("type")) { | ||
return currentBundle.type !== "asset"; | ||
} | ||
return !currentBundle.isAsset; | ||
@@ -91,0 +95,0 @@ }).forEach(function (currentBundle) { |
{ | ||
"name": "rollup-plugin-filesize", | ||
"version": "6.2.1", | ||
"version": "7.0.0", | ||
"description": "A rollup plugin to show filesize in the cli", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -18,5 +18,5 @@ import fileSize from "filesize"; | ||
const values = [ | ||
...(outputOptions.file ? | ||
[`${title("Destination: ")}${value(outputOptions.file)}`] : | ||
(info.fileName ? [`${title("Bundle Name: ")} ${value(info.fileName)}`] : [])), | ||
...(outputOptions.file ? | ||
[`${title("Destination: ")}${value(outputOptions.file)}`] : | ||
(info.fileName ? [`${title("Bundle Name: ")} ${value(info.fileName)}`] : [])), | ||
...[`${title("Bundle Size: ")} ${value(info.bundleSize)}`], | ||
@@ -47,6 +47,6 @@ ...(info.minSize ? [`${title("Minified Size: ")} ${value(info.minSize)}`] : []), | ||
const getData = function(outputOptions, bundle) { | ||
const { code, fileName } = bundle; | ||
const info = {}; | ||
const { code, fileName } = bundle; | ||
const info = {}; | ||
info.fileName = fileName; | ||
info.fileName = fileName; | ||
@@ -81,3 +81,8 @@ info.bundleSize = fileSize(Buffer.byteLength(code), opts.format); | ||
.map(fileName => bundle[fileName]) | ||
.filter(currentBundle => !currentBundle.isAsset) | ||
.filter(currentBundle => { | ||
if (currentBundle.hasOwnProperty("type")) { | ||
return currentBundle.type !== "asset"; | ||
} | ||
return !currentBundle.isAsset; | ||
}) | ||
.forEach((currentBundle) => { | ||
@@ -84,0 +89,0 @@ console.log(getData(outputOptions, currentBundle)) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8676
160