Giter Club home page Giter Club logo

nuget-tree's Introduction

nuget-tree

Installation

Please install the latest version of node.js.

Then install using npm:

> npm install -g nuget-tree

Usage

Navigate to a directory containing a packages.config / project.lock.json file. Then run this command:

> nuget-tree

This will draw a nice dependency tree for you:

packages.config
├─┬ Microsoft.Orleans.OrleansCodeGenerator 1.4.0
│ ├─┬ Microsoft.Orleans.Core 1.4.0
│ │ └── Newtonsoft.Json 9.0.1
│ └─┬ Microsoft.CodeAnalysis.CSharp 1.3.2
│   └─┬ Microsoft.CodeAnalysis.Common 1.3.2
│     └── Microsoft.CodeAnalysis.Analyzers 1.1.0
├─┬ Microsoft.Orleans.OrleansHost 1.4.0
│ ├─┬ Microsoft.Orleans.Core 1.4.0
│ │ └── Newtonsoft.Json 9.0.1
│ └─┬ Microsoft.Orleans.OrleansRuntime 1.4.0
│   ├─┬ Microsoft.Orleans.Core 1.4.0
│   │ └── Newtonsoft.Json 9.0.1
│   ├─┬ Microsoft.Extensions.DependencyInjection 1.0.0
│   │ └── Microsoft.Extensions.DependencyInjection.Abstractions 1.0.0
│   └── Microsoft.Extensions.DependencyInjection.Abstractions 1.0.0
├─┬ Microsoft.Owin.Hosting 3.0.1
│ ├── Owin 1.0
│ └─┬ Microsoft.Owin 3.0.1
│   └── Owin 1.0
└── Nowin 0.23.0

Optional parameters:

  • --hideVersion : hides the package versions
  • --showSystem : shows the System.* packages
  • --onlyTopLevel : lists only the packages at the top level of the tree (i.e. those that are not depended upon by any other package)
  • --flat : lists the dependencies without the hierarchy
  • --why Newtonsoft.Json : shows only dependency trees that reference the given package (Newtonsoft.Json in this case)

License

MIT

nuget-tree's People

Contributors

beeradmoore avatar jchannon avatar kasthack avatar richorama avatar shawnallen85 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

nuget-tree's Issues

No worky :(

I have node 7.6.0

Followed your instructions to install.

Went to folder with project.lock.json and ran nuget-tree but get env: node\r: no such file or directory

Any ideas?

Does not work with custom "repositoryPath"

Hi,

Thanks for this tool. I just wanted to report that it doesn't work when the package directory is customize in nuget.config, such as:

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <config>
    <add key="repositoryPath" value="Lib" />
  </config>
  ...
</configuration>

In this case NuGet packages are found in the "Lib" repository instead of the standard "packages" one.

Maybe this name can be detected, or alternatively, passed as a parameter of the command?

Identify missing packages.

It would be great if this tool could be used to identify missing dependent packages.
E.g. if some package is referenced, but not in the packages directory, show it red.

Otherwise, great tool :) !

Does this work for csproj with packagereferences?

I have a pre csproj 2017 style file, with packagereferences. Using the "migrate to packagerefernces" right click.

can you read csproj with packagereferences?

Cannot find 'packages' directory. Have you run 'nuget restore'?

Display an error message when package.config has a bad format

Currently:

npm install -g nuget-tree
nuget-tree

result:
/usr/local/lib/node_modules/nuget-tree/packages.config.js:19
return parsedOutput.packages.package.map(x => {
^

TypeError: Cannot read property 'packages' of undefined
at Object.module.exports.list (/usr/local/lib/node_modules/nuget-tree/packages.config.js:19:24)
at Object. (/usr/local/lib/node_modules/nuget-tree/app.js:37:48)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.runMain (module.js:605:10)
at run (bootstrap_node.js:420:7)
at startup (bootstrap_node.js:139:9)

project.json deprecated

Planning to update to support newer csproj format with PackageReferences at all?

Also any plans to support packages.config at all?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.