New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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.1.6 to 0.2.0

17

index.js

@@ -38,4 +38,3 @@ /*jshint onevar:false*/

config = config || {};
var name = (name || 'assetviz'),
targetFileName = name + '.html',
var targetFileName = config.fileName || 'assetviz.html',
verbose = config.verbose,

@@ -127,6 +126,16 @@ data = {

.inlineRelations({ type: ['HtmlStyle', 'HtmlScript'] })
.moveAssets({type: 'Html', isInline: false}, function (asset) {
.if(targetFileName !== '-')
.moveAssets({type: 'Html', isInline: false}, function (asset) {
return "file://" + Path.normalize(targetFileName);
})
.writeAssetsToDisc({url: /^file:/})
.writeAssetsToDisc({url: /^file:/})
.queue(function () {
console.warn('Output written to: ' + targetFileName);
})
.endif()
.if(targetFileName === '-')
.queue(function (assetGraph) {
console.log(assetGraph.findAssets({type: 'Html', isInline: false})[0].text);
})
.endif()
.run(function (err) {

@@ -133,0 +142,0 @@ if (err) {

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

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -19,3 +19,3 @@ # AssetViz

```
$ assetviz [-h] [-v] [-r /path/to/webroot] /path/to/webroot/index.html
$ assetviz [-h] [-v] [-r /path/to/webroot] [-o output.html] /path/to/webroot/index.html
$ google-chrome assetviz.html

@@ -37,6 +37,8 @@ ```

**-v** : **Verbose**. Includes inline assets in the output graph. If unset only inline elements relevant to describe file relations will be shown.
**-o** : **Output**. The file name to output to. `-` pipes tp stdout. Defaults to `./assetviz.html` if undefined.
**-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.
**-v** : **Verbose**. Includes inline assets in the output graph. If unset only inline elements relevant to describe file relations will be shown.
## AssetViz output

@@ -43,0 +45,0 @@

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