Socket
Socket
Sign inDemoInstall

rollup-plugin-visualizer

Package Overview
Dependencies
Maintainers
1
Versions
105
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rollup-plugin-visualizer - npm Package Compare versions

Comparing version 2.5.4 to 2.6.0

2

package.json
{
"name": "rollup-plugin-visualizer",
"version": "2.5.4",
"version": "2.6.0",
"main": "plugin/index.js",

@@ -5,0 +5,0 @@ "author": "Denis Bardadym <bardadymchik@gmail.com>",

@@ -8,7 +8,8 @@ "use strict";

module.exports = async function buildHtml(title, nodesData, graphType) {
const [template, script, style] = await Promise.all([
module.exports = async function buildHtml(title, nodesData, graphType, styleOverridePath) {
const [template, script, style, styleOverride] = await Promise.all([
readFile(path.join(__dirname, "stats.template"), "utf-8"),
readFile(path.join(__dirname, "..", "lib", `main-${graphType}.js`), "utf8"),
readFile(path.join(__dirname, "..", "lib", `style-${graphType}.css`), "utf8")
readFile(path.join(__dirname, "..", "lib", `style-${graphType}.css`), "utf8"),
styleOverridePath ? readFile(styleOverridePath, "utf8") : Promise.resolve()
]);

@@ -20,4 +21,5 @@

script,
styleOverride,
nodesData: JSON.stringify(nodesData)
});
};

@@ -43,2 +43,3 @@ "use strict";

const template = opts.template || "sunburst";
const styleOverridePath = opts.styleOverridePath;

@@ -116,3 +117,3 @@ const bundlesRelative = !!opts.bundlesRelative;

const html = await buildStats(title, roots, template);
const html = await buildStats(title, roots, template, styleOverridePath);

@@ -119,0 +120,0 @@ await mkdir(path.dirname(filename));

@@ -47,2 +47,4 @@ # Rollup Plugin Visualizer

`styleOverridePath` (string, default `undefined`) - Link your own css file to override or enhance the current templates
`bundlesRelative` (boolean, default `false`) - Combine all bundles to one diagram

@@ -66,4 +68,8 @@

## Upgrades
v1 -> v2: For v2 was a lot of internal changes, but external interface has not changed.
## Acknowledgements
Initially this plugin was based on `webpack-visualizer`, but in the end used only styles and layout. Thanks to the tons of people around internet for great examples of d3 usage. Also i would like to thank you Mike Bostock for awesome D3, and tons of examples.

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