imrichardcole
imrichardcole

Reputation: 4675

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?

Upvotes: 10

Views: 9947

Answers (2)

Richard Slater
Richard Slater

Reputation: 6378

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'

Upvotes: 17

James Fenwick
James Fenwick

Reputation: 2211

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.

Upvotes: 1

Related Questions