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

steal-npm

v1.0.11

Published

npm plugin for StealJS

Downloads

85

Readme

steal-npm

Build Status

This is a plugin for StealJS that makes it easy to work with npm.

The idea is to reduce the amount of manual configuring needed when using StealJS and instead leverage the metadata included in package.json to have the configuration done for you.

Install

If you're using StealJS you don't have have to install this plugin, it's included by default.

Configuration

All of the configuration happens within the steal property of your package.json.

main

The moduleName of the initial module that should be loaded when the package is imported. This works similar to a System.map setting. For example:

{
  "name": "my-module",
  "version": "1.2.3",
  "steal": {
    "main": "my-main"
  }
}

When "my-module" is imported, [email protected]#my-main will be the actual module name being imported. This path that my-main will be found depends on the directories.lib setting.

meta

The meta config works similar to the base System.meta behavior. However, the module names must:

  • Start with ./ to add metadata to modules within the package like "./src/util", or
  • Look like packageName#./modulePath to add metadata to direct dependencies of the package.

Example:

{
  "steal": {
    "meta": {
      "./src/utils": {"format": "amd"},
      "jquery": {"format": "global"},
      "lodash#./array/grep": {"format": "es6"}
    }
  }
}

npmIgnore

Use npmIgnore to prevent package information from being loaded for specified dependencies or the peerDependencies, devDependencies, or dependencies. The following ignores a package.json's devDependencies and cssify. But all other dependencies will be loaded:

{
  "dependencies": {
    "canjs": "2.1.0",
    "cssify": "^0.6.0"
  },
  "devDependencies": {
    "steal-tools": "0.5.0"
  },
  "steal": {
    "npmIgnore": ["devDependencies","cssify"]
  }
}

The following packages are ignored by default:

  • "steal", "steal-tools"
  • "bower"
  • "grunt", "grunt-cli"

npmDependencies

Like npmIgnore but affirmative. If used alone will only include the dependencies listed. If used in conjunction with npmIgnore acts as an override. For example the following config:

{
  "dependencies": {
    "one": "1.0.0",
	"two": "1.0.0"
  },
  "steal": {
    "npmDependencies": [ "one" ]
  }
}

Will load one but ignore two.

ignoreBrowser

Set to true to ignore browserfy's "browser" and "browserify" configurations.

{
  "steal": {
    "ignoreBrowser": true
  }
}

directories

Set a folder to look for module's within your project. Only the lib directory can be specified.

In the following setup, "my-project/my-utils" will be looked for in my-project/src/my-utils.js:

{
  "name": "my-project"
  "steal": {
    "directories" : {
      "lib" : "src"
    }
  }
}

License

MIT