8.0.0 • Published 3 years ago

atom-package-deps v8.0.0

Weekly downloads
44,488
License
MIT
Repository
github
Last release
3 years ago

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.

8.0.0

3 years ago

7.2.3

3 years ago

7.2.2

3 years ago

7.2.1

3 years ago

7.2.0

3 years ago

7.1.0

3 years ago

7.0.3

3 years ago

7.0.2

3 years ago

7.0.1

4 years ago

7.0.0

4 years ago

6.0.0

4 years ago

5.1.0

5 years ago

5.0.0

5 years ago

4.6.2

6 years ago

4.6.1

6 years ago

4.6.0

7 years ago

4.5.0

7 years ago

4.4.1

7 years ago

4.4.0

7 years ago

4.3.1

8 years ago

4.3.0

8 years ago

4.2.0

8 years ago

4.1.0

8 years ago

4.0.1

8 years ago

4.0.0

8 years ago

3.0.9

8 years ago

3.0.8

8 years ago

3.0.7

8 years ago

3.0.6

8 years ago

3.0.5

8 years ago

3.0.4

8 years ago

3.0.3

8 years ago

3.0.2

8 years ago

3.0.1

8 years ago

3.0.0

8 years ago

2.1.3

9 years ago

2.1.2

9 years ago

2.1.1

9 years ago

2.1.0

9 years ago

2.0.5

9 years ago

2.0.4

9 years ago

2.0.3

9 years ago

2.0.2

9 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.0.0

9 years ago

0.0.1

9 years ago