Is there a best practice for creating helper modules for shared code between packages, when this code directly uses atom’s api?
Such a module should be an npm package instead of an atom package, since it provides no user interface and atom packages lack dependens-on-other-atom-package support (?).
The easiest way to develop such a module I can think of, is to be to create an atom package which requires it. Which seems rather hacky to me. Also, how would one set up the unit tests? Wrapping it in an atom package for running the specs would - again - be hacky.
As a concrete example, imagine a module providing helper functions for opening files and maintaining a connection to another file, e.g. a source file and the compiled version. This helper could be used by all the preview packages available for different file types.