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

assetviz

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

assetviz - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

tpl/vendor/filesize.js

18

index.js

@@ -36,2 +36,16 @@ /*jshint onevar:false*/

function hasOutgoingRelationToNonInlineAsset(asset) {
var hasOutgoingRelations = false,
outgoingRelations = asset.outgoingRelations;
for (var i = 0 ; i < outgoingRelations.length ; i +=1 ) {
var outgoingRelation = outgoingRelations[i];
if (outgoingRelation.to.isLoaded && outgoingRelation.to.url && outgoingRelation.to.isAsset) {
return true;
} else if (outgoingRelation.to.isLoaded && hasOutgoingRelationToNonInlineAsset(outgoingRelation.to)) {
return true;
}
}
return false;
}
module.exports = function (config) {

@@ -46,3 +60,3 @@ config = config || {};

return function drawGraph(assetGraph, cb) {
return function assetviz(assetGraph, cb) {
var idx = 0,

@@ -53,3 +67,3 @@ vizGraph = new assetGraph.constructor({ root: Path.normalize(Path.dirname(module.filename) + '/tpl/') }),

assetGraph.findAssets().forEach(function (asset) {
if (verbose || asset.url || asset.outgoingRelations.length) {
if (verbose || asset.url ||hasOutgoingRelationToNonInlineAsset(asset)) {
asset.idx = idx;

@@ -56,0 +70,0 @@ var size = 400;

4

package.json
{
"name": "assetviz",
"version": "0.2.0",
"version": "0.2.1",
"description": "A graph visualization of the assets and their relations in your web app",

@@ -23,3 +23,3 @@ "main": "index.js",

"dependencies": {
"assetgraph": "=1.3.2",
"assetgraph": "=1.6.0beta10",
"colors": "*",

@@ -26,0 +26,0 @@ "optimist": "*"

# AssetViz
A command line web application source code visualization tool.
Assetviz is a web application code base visualization tool.
Generate a self encapsulated html-file with a force directed graph representing the assets in your project and their relations.
As an added bonus this also works with any web page url as well.
![Example](https://raw.github.com/munter/assetviz/master/example/assetviz.png)

@@ -36,3 +39,3 @@

**-o** : **Output**. The file name to output to. `-` pipes tp stdout. Defaults to `./assetviz.html` if undefined.
**-o** : **Output**. The file name to output to. `-` pipes to stdout. Defaults to `./assetviz.html` if undefined.

@@ -39,0 +42,0 @@ **-r** : **Root**. Tells AssetViz which directory to treat as the web root. Only useful if you are graphing an html-file that has relations outside its own directory.

@@ -82,2 +82,5 @@ /*global d3, assetgraph*/

nodes.append('title')
.text(function (d) { return d.fileName + ' - ' + filesize(d.size); });
nodes.append('text')

@@ -84,0 +87,0 @@ .attr('text-anchor', 'middle')

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