Atom plugin development environment

This is a short blog post explaining how to setup a dev environment for Atom plugins.

1. Symlink your package

Most developers keep their projects in a workspace directory (e.g. ~/workspace). If you want Atom to use a package that lives in your workspace directory then you’ll need to symlink the package from your workspace to the atom packages directory. To create the symlink, you can use the ln -s command. For example:

ln -s ~/workspace/atom-test-runner/ atom-test-runner
2. Testing your changes

Now that you’ve setup the symlink, Atom will use the source code in workspace. You can edit your package’s source code and test out the changes in atom. Once you’ve made a change to the source code, you’ll need to reload Atom in order for the changes to take effect. To do this, simply run window:reload.

3. Run tests and commit your changes

After you’ve manually tested your changes you’ll want to run the package specs to make sure they are all passing. You can run the package specs with apm test. If your tests are green and you’re happy to commit your changes you can commit and push to Github.

4. Making it live

Once everything is merged to master and you are happy, you can publish your latest changes to Atom Packages by running: apm publish [major|minor|patch]. Essentially, a patch would be a small bug fix. minor would be a new feature or change that does not break your existing API and major is a change that breaks the API and should be treated as an entirely new version.