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

atom-package-deps

v8.0.0

Published

Automatically install package dependencies

Downloads

1,468

Readme

Atom-Package-Deps

Atom-Package-Deps is a module that lets your atom package depend on other atom packages, It's quite simple and shows a nice progress bar as a notification as the packages are installed.

How it works?

You need to have an array of package deps in your package manifest, like

{
  "name": "linter-ruby",
  ...
  "package-deps": [{ "name": "linter" }]
}

If only the name of the package is needed, you can specify the name directly as a string instead of an object for that entry:

  "package-deps": ["linter"]

You can also specify the minimum required version (version not semver-range!) of the package, or give users a choice by specifying multiple ones.

{
  "name": "linter-ruby",
  ...
  "package-deps": [
    // Add a dependency on a package:
    { "name": "linter", "minimumVersion": "2.0.0" },
    // Add a dependency in any of the following packages,
    // so if one is already installed, user is not prompted to install the other
    [ { "name": "linter" }, { "name": "atom-ide-ui" } ]
  ]
}

Because the package installation is async, it returns a promise that resolves when all the dependencies have been installed.

'use babel'

module.exports = {
  activate() {
    // replace the example argument 'linter-ruby' with the name of this Atom package
    require('atom-package-deps')
      .install('linter-ruby')
      // ^ NOTE: This is the name of YOUR package, NOT the package you want to install.
      .then(function() {
        console.log('All dependencies installed, good to go')
      })
  },
}

API

You can use this package programatically via this exported interface:

export function install(packageName: string, hideUserPrompt: boolean = false)

Alternatively, if you want to install dependencies via CLI, this package exposes a bin for that

Usage: atom-package-deps <directory> <hideUserPrompt = true>

Screenshots

Installation Prompt

Installation Prompt with choices:

Installation Progress

Installation Complete

License

This project is licensed under the terms of MIT license, See the LICENSE file for more info.