Comparing version 0.1.3 to 0.1.4
16
index.js
@@ -0,1 +1,3 @@ | ||
/*jshint onevar:false*/ | ||
var Path = require('path'), | ||
@@ -10,3 +12,3 @@ fs = require('fs'), | ||
HtmlAlternateLink: '<link rel=alternate>', | ||
HtmlConditionalComment: function (htmlConditionalComment) {return '<!--[if ' + htmlConditionalComment.condition + ']>';}, | ||
HtmlConditionalComment: function (htmlConditionalComment) {return '<!--[if ' + htmlConditionalComment.condition + ']>'; }, | ||
HtmlImage: '<img>', | ||
@@ -35,5 +37,7 @@ HtmlAudio: '<audio>', | ||
module.exports = function (name) { | ||
name = (name || 'assetviz'); | ||
var targetFileName = name + '.html', | ||
module.exports = function (config) { | ||
config = config || {}; | ||
var name = (name || 'assetviz'), | ||
targetFileName = name + '.html', | ||
verbose = config.verbose, | ||
data = { | ||
@@ -50,3 +54,3 @@ assets: [], | ||
assetGraph.findAssets().forEach(function (asset) { | ||
if (asset.url || asset.outgoingRelations.length) { | ||
if (verbose || asset.url || asset.outgoingRelations.length) { | ||
asset.idx = idx; | ||
@@ -71,3 +75,3 @@ var size = 400; | ||
assetGraph.findRelations().forEach(function (relation) { | ||
if ('idx' in relation.from && 'idx' in relation.to) { | ||
if (verbose || ('idx' in relation.from && 'idx' in relation.to)) { | ||
var typeString = relationLabelByType[relation.type] || ''; | ||
@@ -74,0 +78,0 @@ if (typeof typeString === 'function') { |
{ | ||
"name": "assetviz", | ||
"version": "0.1.3", | ||
"version": "0.1.4", | ||
"description": "A graph visualization of the assets and their relations in your web app", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
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
139891
636