Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing package dependencies in Atom

I've added the following into my package.json file:

"dependencies": {
  "linter": "1.11.4"
}

But how do I actually get this dependency installed?

like image 478
imrichardcole Avatar asked Apr 23 '16 11:04

imrichardcole


People also ask

How do I install packages in Atom?

There are two ways to install packages for Atom, Enter apm install package-name on your terminal. Obviously, the Atom package manager, apm , must be installed (you can enter apm to verify installation). Open Atom, go to edit > preferences > install and search for the package you wish to install.

How do I manually install a package in Atom?

There are mainly two ways to install packages for Atom: Enter apm install package-name on your terminal. Obviously, the Atom package manager, apm, must be installed (you can enter apm to verify installation). Open Atom and go to edit > preferences > install and then search for the package you want to install.


2 Answers

After you have updated your packages.json and saved the file you can install the dependencies by running Update Package Dependencies: Update:

  1. Press Ctrl-Shift-P to open the Command Palette.
  2. Type updu which should select Update Package Dependencies: Update
  3. Press Enter

Update Package Dependencies: Update

If you are going to be doing a lot of this you can take it a step further and add a keybinding:

'atom-workspace':
  'ctrl-alt-shift-u': 'update-package-dependencies:update'
like image 110
Richard Slater Avatar answered Sep 20 '22 18:09

Richard Slater


You install your package then Atom/npm take care of installing the dependencies.

https://discuss.atom.io/t/load-developing-package/2554/4

When you start Atom it loads packages from various directories. When you open it in developer mode it loads additional packages from ~/.atom/dev/packages, so the first thing to do is to move/symlink your package to that directory.

Then you can go to your new package directory and run atom -d . to create a new atom window in developer mode and automatically add your package as a project directory.

Then you can run apm install to update your dependencies.

like image 42
James Fenwick Avatar answered Sep 18 '22 18:09

James Fenwick