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

npm-dep

v2.0.5

Published

NPM Group Dependency Manager

Downloads

2

Readme

Build Status Dependency Status semantic-release npm-download

Introduction

npm-dep provides a way to cache your tools dependencies on your file system so you don't need to re-download them again while allowing to share them between projects.

Currently NPM install all the dependencies from dependencies and devDependencies inside your package.json file at install time (npm install).

But what if:

  • You just want to install a custom set of dependencies when you execute a run script (npm run xxx).

  • You don't want to re-download Webpack, PhantomJS, Karma for a freshly created project.

  • You want to easily check if any new version of a dependency is available.

Then maybe npm-dep is for you...

Usage

To enable npm-dep inside your package, you simply need to add it to your dependencies and add a new section dep inside your package.json file like the following example.

package.json

{
    "dependencies": {
        "npm-dep": "latest"
    },
    "dep": {
        "default": {
            "underscore": "1.8.3"
        },
        "test": {
            "expect":"1.13.4",
            "jasmine-core": "2.4.1",
            "jest-cli": "0.8.2",
            "phantomjs": "1.9.19"
        },
        "build": {
            "node-libs-browser": "1.0.0",

            "babel-core": "6.4.5",
            "babel-loader": "6.2.1",
            "babel-preset-es2015": "6.3.13",
            "babel-preset-react": "6.3.13",

            "css-loader": "0.23.1",
            "expose-loader": "0.7.1",
            "file-loader": "0.8.5",
            "json-loader": "0.5.4",
            "style-loader": "0.13.0",
            "url-loader": "0.5.7",

            "webpack": "1.12.12"
        }
    },
    "script": {
        "postinstall": "npm-dep --silent default",
        "pretest": "npm-dep --silent build test",
        "prebuild": "npm-dep --silent build"
    }
}

or externalise that information to another file so it could be used by another project that depend on your npm-dep friendly application.

# ./config/tools.js
module.exports = {
    
    // Use to build code
    groupNameA: {
        packageName: 'version',
        [...]
    },

    // Use to test section A
    groupNameB: {
        packageName2: 'version54',
        [...]
    }
}

# package.json
{
    [...]

    "config": {
        "npm-dep": {
            "path": "config/tools.js"
        }
    }
}

Then when running, npm-dep will cache all downloaded packages inside your ${HOME}/.npm-dep/pkg@ver/... directory and will then copy any node_modules/.bin/* and node_modules/* into your local ./node_modules/ directory.

Here is the full list of usage:

  Usage: npm-dep [options] and/or target1 target2 ...

  Options:

    -h, --help           output usage information
    -V, --version        output the version number

    -c, --check          Check outdated dependencies.
    -p, --check-package  Check package.json dependencies.
    
    -l, --list           List dependency targets.
    -a, --all            Install all target dependencies.
    
    -s, --silent         Silence any output.

Licensing

npm-dep is licensed under BSD Clause 3.

Getting Involved

Fork our repository and do great things. At Kitware, we've been contributing to open-source software for 15 years and counting, and want to make npm-dep useful to as many people as possible.