How to make a package install other packages


#1

Hi,
I recently created a package. However, the package relies on another package.
My package is called main-bol and it relies autocomplete-lua

Also, i have this in my package.json, but it still doesn’t seem to install to the user when he download my package.

Thank you for your support! Atom is amazing and i can’t wait to make more packages!


#2

Atom doesn’t provide a mechanism for one package to force the installation of another Atom package. See this previous topic for the entire history:

We like to unify similar discussions under one topic so that people don’t have to read a bunch of different threads to get the whole story. Please continue the discussion there. I’ll be closing this topic as duplicate.


#3

Besides providing a list to package dependencies, you need to invoke install() in your code.

Example:

module.exports = {
  activate() {
    // replace the example argument 'main-bol' with the name of this Atom package 
    require('atom-package-deps').install('main-bol', true)
      .then(function() {
        console.log('All dependencies installed, good to go')
      })
  }
}

(as mentioned in the README)


#4

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.