You can get it on NPM, https://www.npmjs.com/package/effex-api-client, and install it like this
The code is on github, and where you'll also find detailed documentation on the API, which I won't bother repeating in this post.
If you are planning to publish something on NPM, then you have to publish the transpiled version of your code - not the original source code. Let's take a look at how to do that.
Build versus source
The files under src, are the ones I work on, and the files under dist are the ones that get built and are published to npm. node_modules contain all the node dependencies I'm using - and there are many - to provide the functionality I need, but mainly to do the code transpilation. Here's a snapshot of just a few.
All this is defined with a file called package.json, where you set up a list of things you'll need. There are two kinds of dependencies
The dependencies of my my package.json looks like this. I need axios to run in production, and the other stuff is only needed for testing and transpilation. The list of node_modules is of course a lot bigger than this - because of these themselves have dependencies which they pulled in automatically.
To install you can either update the package.json manually the just run npm install, or you can use npm
when you enter
When you do publish, you probably don't want everything to go up to npm. You only want the directory with your built code in it - namely dist, along with your package.json, README etc. You can create a .npmignore file to instruct npm to ignore certain things. My .npmignore simply looks like this
You also have to give npm a version number and how to initiate the module. Here's my completed package.json including that stuff.
Now we're ready to publish!
and if all goes well
Services > Desktop Liberation - the definitive resource for Google Apps Script and Microsoft Office automation > Ephemeral Exchange >