Atom contains a number of packages that are Node modules instead of Atom packages. If you want to make changes to the Node modules, for instance atom-keymap
, you have to link them into the development environment differently than you would a normal Atom package.
Here are the steps to run a local version of a Node module within Atom. We're using atom-keymap
as an example:
git clone https://github.com/atom/atom-keymap.git cd atom-keymap npm install npm link cd WHERE YOU CLONED ATOM npm link atom-keymap # This is the special step, it makes the Node module work with Atom's version of Node apm rebuild # If you have cloned Atom in a different location than %USERPROFILE%\github\atom # you need to set the following environment variable setx ATOM_DEV_RESOURCE_PATH=WHERE YOU CLONED ATOM # Should work! atom --dev .
git clone https://github.com/atom/atom-keymap.git cd atom-keymap npm install npm link cd WHERE YOU CLONED ATOM npm link atom-keymap # This is the special step, it makes the Node module work with Atom's version of Node apm rebuild # If you have cloned Atom in a different location than ~/github/atom # you need to set the following environment variable export ATOM_DEV_RESOURCE_PATH=WHERE YOU CLONED ATOM # Should work! atom --dev .
git clone https://github.com/atom/atom-keymap.git cd atom-keymap npm install npm link cd WHERE YOU CLONED ATOM npm link atom-keymap # This is the special step, it makes the Node module work with Atom's version of Node apm rebuild # If you have cloned Atom in a different location than ~/github/atom # you need to set the following environment variable export ATOM_DEV_RESOURCE_PATH=WHERE YOU CLONED ATOM # Should work! atom --dev .
After you get the Node module linked and working, every time you make a change to the Node module's code, you will have to exit Atom and do the following:
cd WHERE YOU CLONED THE NODE MODULE npm install cd WHERE YOU CLONED ATOM apm rebuild atom --dev .