node.jsmacospkgbuildbitrock

How to create an OSX (pkg) installer for NodeJS Apps?


I have a nodejs script that I want to package and allow for easy installation for non technical users. It's just a script that runs in the background, so electron seems overkill.

I was thinking of making it a launch daemon but not sure how to go about that.

I found this: https://coolaj86.com/articles/how-to-create-an-osx-pkg-installer.html But those instructions don't seem to apply anymore.

Any idea how you could do this now on Sierra?

Thanks!


Solution

  • This node module was just announced a couple of days ago, and seems to be what you're looking for:

    https://github.com/zeit/pkg

    Since it's so new, I haven't had any luck finding tutorials, docs or demos, but they're bound to start appearing in the coming weeks or months.