Is it possible to include a binary executable in NPM package? I am struggling to do so on macOS.
I am working on an electron application which uses SVN. Using svn-spawn package I am able to communicate with the svn if it's installed on the machine. However, I would like to not to install SVN and my application separately.
Since SVN works as a single executable - either svn.exe on Windows or svn on macOS, I can edit the following block in node_modules/svn-spawn/lib/svn.js
var Client = function(options) {
    this.option({
        program: '<path_to_svn>/svn.exe'
    }).option(options);
};
After I package it:
- works on Windows (even after uninstalling svn - meaning svn became a part of the application)
 - works on macOS when svn is still in the directory
 - doesn't work on macOS when svn is deleted
 
What is the right way of including executables like that in npm installation?