rollup-plugin-analyzer
Advanced tools
Comparing version 3.1.0 to 3.1.1
@@ -7,9 +7,9 @@ ### Changelog | ||
### [3.1.0](https://github.com/doesdev/rollup-plugin-analyzer/compare/3.0.1...3.1.0) | ||
### [3.1.1](https://github.com/doesdev/rollup-plugin-analyzer/compare/3.1.0...3.1.1) | ||
> 1 June 2019 | ||
> 7 July 2019 | ||
- Update dependencies | ||
- Don't combine bar graph with id in summary | ||
### [3.0.1](https://github.com/doesdev/rollup-plugin-analyzer/compare/3.0.0...3.0.1) | ||
### [3.1.0](https://github.com/doesdev/rollup-plugin-analyzer/compare/3.0.1...3.1.0) | ||
@@ -21,2 +21,8 @@ > 6 July 2019 | ||
### [3.0.1](https://github.com/doesdev/rollup-plugin-analyzer/compare/3.0.0...3.0.1) | ||
> 1 June 2019 | ||
- Update dependencies | ||
### [3.0.0](https://github.com/doesdev/rollup-plugin-analyzer/compare/2.1.0...3.0.0) | ||
@@ -23,0 +29,0 @@ |
15
index.js
@@ -33,2 +33,4 @@ 'use strict'; | ||
analysis.modules.forEach((m, i) => { | ||
const id = m.id.replace(/\\/g, '/'); | ||
const size = formatBytes(m.size); | ||
const percentInt = parseInt(m.percent, 10); | ||
@@ -40,13 +42,10 @@ const percentFilled = (percentInt ? parseInt(percentInt / 2, 10) : 0) + 1; | ||
const rawBar = `${barFilled}${barEmpty}`; | ||
const bar = !summaryOnly ? rawBar : `` + | ||
`${rawBar.slice(0, 25 - (m.id.length / 2))}` + | ||
`${m.id}` + | ||
`${rawBar.slice((m.id.length / 2) - 25)} ` + | ||
`${m.percent} %`; | ||
const summaryBar = `${id}\n${rawBar} ${m.percent} % (${size})`; | ||
const bar = !summaryOnly ? rawBar : summaryBar; | ||
formatted += summaryOnly ? `${bar}\n` : `` + | ||
`${bar}\n` + | ||
`file: ${buf}${m.id}\n` + | ||
`file: ${buf}${id}\n` + | ||
`bundle space: ${buf}${m.percent} %\n` + | ||
`rendered size: ${buf}${formatBytes(m.size)}\n` + | ||
`rendered size: ${buf}${size}\n` + | ||
`original size: ${buf}${formatBytes(m.origSize || 'unknown')}\n` + | ||
@@ -58,3 +57,3 @@ `code reduction: ${buf}${m.reduction} %\n` + | ||
m.dependents.forEach((d) => { | ||
formatted += `${tab}-${buf}${d.replace(root, '')}\n`; | ||
formatted += `${tab}-${buf}${d.replace(root, '').replace(/\\/g, '/')}\n`; | ||
}); | ||
@@ -61,0 +60,0 @@ } |
@@ -31,2 +31,4 @@ 'use strict' | ||
analysis.modules.forEach((m, i) => { | ||
const id = m.id.replace(/\\/g, '/') | ||
const size = formatBytes(m.size) | ||
const percentInt = parseInt(m.percent, 10) | ||
@@ -38,13 +40,10 @@ const percentFilled = (percentInt ? parseInt(percentInt / 2, 10) : 0) + 1 | ||
const rawBar = `${barFilled}${barEmpty}` | ||
const bar = !summaryOnly ? rawBar : `` + | ||
`${rawBar.slice(0, 25 - (m.id.length / 2))}` + | ||
`${m.id}` + | ||
`${rawBar.slice((m.id.length / 2) - 25)} ` + | ||
`${m.percent} %` | ||
const summaryBar = `${id}\n${rawBar} ${m.percent} % (${size})` | ||
const bar = !summaryOnly ? rawBar : summaryBar | ||
formatted += summaryOnly ? `${bar}\n` : `` + | ||
`${bar}\n` + | ||
`file: ${buf}${m.id}\n` + | ||
`file: ${buf}${id}\n` + | ||
`bundle space: ${buf}${m.percent} %\n` + | ||
`rendered size: ${buf}${formatBytes(m.size)}\n` + | ||
`rendered size: ${buf}${size}\n` + | ||
`original size: ${buf}${formatBytes(m.origSize || 'unknown')}\n` + | ||
@@ -56,3 +55,3 @@ `code reduction: ${buf}${m.reduction} %\n` + | ||
m.dependents.forEach((d) => { | ||
formatted += `${tab}-${buf}${d.replace(root, '')}\n` | ||
formatted += `${tab}-${buf}${d.replace(root, '').replace(/\\/g, '/')}\n` | ||
}) | ||
@@ -59,0 +58,0 @@ } |
{ | ||
"name": "rollup-plugin-analyzer", | ||
"version": "3.1.0", | ||
"version": "3.1.1", | ||
"description": "Mad metrics for your rollup bundles, know all the things", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -78,8 +78,8 @@ # rollup-plugin-analyzer [![NPM version](https://badge.fury.io/js/rollup-plugin-analyzer.svg)](https://npmjs.org/package/rollup-plugin-analyzer) [![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://github.com/feross/standard) [![Dependency Status](https://dependencyci.com/github/doesdev/rollup-plugin-analyzer/badge)](https://dependencyci.com/github/doesdev/rollup-plugin-analyzer) [![Build Status](https://travis-ci.com/doesdev/rollup-plugin-analyzer.svg)](https://travis-ci.com/doesdev/rollup-plugin-analyzer) | ||
bundle size: 2.809 KB | ||
original size: 11.384 KB | ||
code reduction: 75.33 % | ||
original size: 11.436 KB | ||
code reduction: 75.44 % | ||
module count: 5 | ||
█████████████████████████████████████████████░░░░░ | ||
file: \import-d.js | ||
file: /virtual-insanity.js | ||
bundle space: 90.64 % | ||
@@ -90,20 +90,20 @@ rendered size: 2.546 KB | ||
dependents: 1 | ||
- \import-c.js | ||
- /jamiroquai.js | ||
██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | ||
file: \bundle-a.js | ||
file: /bundle-a.js | ||
bundle space: 4.27 % | ||
rendered size: 120 Bytes | ||
original size: 267 Bytes | ||
code reduction: 55.06 % | ||
original size: 309 Bytes | ||
code reduction: 61.17 % | ||
dependents: 0 | ||
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ | ||
file: \import-c.js | ||
file: /jamiroquai.js | ||
bundle space: 2.95 % | ||
rendered size: 83 Bytes | ||
original size: 161 Bytes | ||
code reduction: 48.45 % | ||
original size: 169 Bytes | ||
code reduction: 50.89 % | ||
dependents: 1 | ||
- \import-b.js | ||
- /the-alphabet-but-incomplete.js | ||
... | ||
@@ -118,11 +118,16 @@ ``` | ||
bundle size: 2.809 KB | ||
original size: 11.384 KB | ||
code reduction: 75.33 % | ||
original size: 11.436 KB | ||
code reduction: 75.44 % | ||
module count: 5 | ||
███████████████████\import-d.js██████████████░░░░░ 90.64 % | ||
██░░░░░░░░░░░░░░░░░\bundle-a.js░░░░░░░░░░░░░░░░░░░ 4.27 % | ||
█░░░░░░░░░░░░░░░░░░\import-c.js░░░░░░░░░░░░░░░░░░░ 2.95 % | ||
░░░░░░░░░░░░░░░░░░░\import-b.js░░░░░░░░░░░░░░░░░░░ 1.17 % | ||
░░░░░░░░░░░░░░░░░░░\import-a.js░░░░░░░░░░░░░░░░░░░ 0.96 % | ||
/virtual-insanity.js | ||
█████████████████████████████████████████████░░░░░ 90.64 % (2.546 KB) | ||
/bundle-a.js | ||
██░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 4.27 % (120 Bytes) | ||
/jamiroquai.js | ||
█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 2.95 % (83 Bytes) | ||
/the-alphabet-but-incomplete.js | ||
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 1.17 % (33 Bytes) | ||
/the-declaration-of-independence.js | ||
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ 0.96 % (27 Bytes) | ||
``` | ||
@@ -129,0 +134,0 @@ |
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
34253
213
325