npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

scavenger-cli

v0.1.1

Published

A library and CLI tool for cloning and extracting resources from git servers en masse.

Downloads

4

Readme

Scavenger CLI

NPM Travis CI MIT License

Scavenger aggregates documentation from project repositories and prepares it for static HTML generation.

Installation

Install Scavenger globally for ease of use. To install Scavenger, run the following command:

$ npm install -g scavenger-cli

Using Scavenger

Scavenger provides a utility called scavenger.

scavenger provides several sub-commands commands outlined below.

scout

The scout command is responsible for discovering projects through scents. scout writes a local definitions file for use with other scavenger sub-commands. Scents are dynamically loaded packages that follow the scavenger-scent-{package-name} convention.

For example, to invoke the NPM Scent, pass the name of the scent as the first argument and any further arguments will be pass on to the scent.

$ scavenger scout npm temando:developers

For a list of options that can be uses with scout, run the following command:

$ scavenger scout --help

For maximum compatibility with scents, add these options last.

Definitions file

A definitions file is a JSON file that describes how to get the source code for project, for example:

[
  {
    "id": "remark-graphviz",
    "name": "remark-graphviz",
    "repositoryUrl": "https://github.com/temando/remark-graphviz.git",
    "commitIsh": "master"
  },
  {
    "id": "remark-gitlab-artifact",
    "name": "remark-gitlab-artifact",
    "repositoryUrl": "https://github.com/temando/remark-gitlab-artifact.git"
  }
]

fetch

The fetch command parses the definitions file from the scout command and fetches a copy of the project for the specified project id.

For example, to fetch a copy of the remark-graphviz project, run the following command:

$ scavenger fetch --input path/to/definitions.json --filter remark-graphviz

Note that remark-graphviz matches the id from the definitions file. If the --filter option is omitted, all projects defined in the definitions file will be fetched.

For a list of options that can be used with fetch, run the following command:

$ scavenger fetch --help

thieve

The thieve command takes the documentation from the fetch project and copies it into a staging area (docs sub-directory).

For example, to thieve the documentation for the remark-gitlab-artifact project, run the following command:

$ scavenger thieve remark-gitlab-artifact

Note that the project name remark-gitlab-artifact matches id under the definitions file.

For a list of options that can be uses with thieve, run the following command:

$ scavenger thieve --help

Documentation is defined as either:

  • Files specified in .scavengerrc.json file located in either:
    • The project's path.
    • The current working directory of scavenger.
  • The following in the project's root, if no .scavengerrc.json file is found:
    • /README.md
    • /CONTRIBUTING.md
    • /CHANGELOG.md
    • /resources/*
    • /ts-definition.json/yaml/yml

A .scavengerrc.json file completely overrides default heuristics. They are not included with thieving files. A .scavengerrc.json file in the current working directory will override one found in the project directory.

The following .scavengerrc.json explicitly includes the files that would otherwise be added by the default heuristics, the manual directory and its contents:

{
  "docs": [
    "manual",
    "README.md",
    "CONTRIBUTING.md",
    "CHANGELOG.md"
  ]
}

devour

The devour command combines the fetch and thieve commands for all projects registered in the definitions file generated by scout.

To fetch and thieve all projects listed in a definitions file called projects.json, run the following command:

$ scavenger devour --input projects.json

For a list of options that can be uses with devour, run the following command:

$ scavenger devour --help