My goal is to call OS X Launch Services native methods from my Atom package.
To do this I’ve wrapped a small portion of the OS X Launch Services API in a node package here:
I’m sure there are some issues with it, my first native package, but it general seems to work. I can build it and the tests run. I’ve tried to use the same structure as https://github.com/atom/node-spellchecker while also following the
nan boilerplate https://github.com/fcanas/node-native-boilerplate.
Now that I have this proof of concept working, I’m not sure what the next step is. I just tried installing this package into my Atom package like this:
npm install FoldingText/launch-services and get an error “Error: Cannot find module ‘nan’”.
Could someone give me an overview of how to use native models from Atom packages. I’ve seen https://github.com/atom/electron/blob/master/docs/tutorial/using-native-node-modules.md but I think I need a higher level overview first. In particular I’m not sure where the compiling is supposed to happen (at release time or at install time?) and in general I’d love any tips on how to manage native models that you can provide.