8000 GitHub - sfowl/deplist
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sfowl/deplist

 
 

Repository files navigation

Tests

deplist

Scan and list the dependencies in a source code repository.

Supports:

  • Go
  • NodeJS
  • Python
  • Ruby
  • Java

Dependencies are printed in PackageURL format.

Requirements

On Fedora:

$ dnf install golang-bin yarnpkg maven rubygem-bundler ruby-devel gcc gcc-c++ npm

Also supports rbenv. Any ruby versions installed with rbenv will be used as backups from starting with system ruby (if available), and then from newest to oldest.

Command Line

Build from source

$ make
go build cmd/deplist/deplist.go

Run

$ ./deplist test/testRepo
pkg:npm/d3-scale-chromatic@2.0.0
pkg:npm/d3-time@2.0.0
pkg:npm/prop-types@15.7.2
pkg:npm/react@16.13.1
...

API

The api functions as follows:

func GetDeps(fullPath string) ([]Dependency, Bitmask, error) {

Parameters

  • fullPath:

    Path to directory with source code.

Returns

  • Depenency:

    Array of Dependency structs from dependencies.go

  • Bitmask:

    A bitmask of found languages:

const (
	LangGolang = 1 << iota
	LangNodeJS
	LangPython
	LangRuby
)
  • error:

    Standard Go error handling

Packages

No packages published

Languages

  • Go 95.7%
  • Ruby 2.2%
  • Other 2.1%
0