Giter Site home page Giter Site logo

package-usage's Introduction

package-usage

Here you will find scripts that allow you to get a package usage statistics.

Use

Firstly you need to run:

npm install

Azure token

In order to use scripts you need to get an Azure token.

  1. Go to your company's Azure DevOps page.

  2. Open "Personal access tokens" page

    Dropdown menu with "Personal access tokens" highlighted

  3. Click "New Token"

    "New Token" highlighted

  4. Give token a name, select "Read" permission under "Code" and click "Create"

    "Read" permission under "Code" highlighted

  5. Save your token in the safe place for later use.

Package usage statistics

In order to get specific package usage run this command:

node package-usage.js companyName packageName azureToken

companyName - name of your company, you can just copy it from the URL https://dev.azure.com/companyName/.

packageName - name of the package that you want to get statistics.

azureToken - Azure token that you got from previous step.

Components usage statistics

In order to get statistics of components usage per project, you need to run:

node components-usage.js companyName packageName azureToken

It will create a file repositoryComponentsMap-package-name.json which contains an object where key is a repo name and value is object where components is an object with keys being components name and components usage as values, there is also lastModifiedDate that can be used to determine whether repo is stale.

Then you can run your own scripts on this file or you can also call node summary-component-usage.js (firstly you need to change hardcoded components inside, sorry) and you will get .csv file with unique components count used in the repos.

package-usage's People

Contributors

bentleyvk avatar

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.