Package Exports
- nwjs-osx-menu
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (nwjs-osx-menu) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
nwjs-osx-menu
Creates a default menu for your nw.js program on Mac OS X, thereby enabling functionality like Copy-and-Paste.
Background
Lack of ⌘C(copy) and ⌘V(paste) was making development difficult on nw.js. Originally, I had saved the code as a gist/snippet. But even this required copy and paste. I was getting tired of typing in this boilerplate every time, I ran my app. So I tried to find a better solution.
I checked to see if anyone has created module to address this problem. It appeared that no one had. I also checked, to see if code for this would make more sense in nw.js itself. It did not. It also probably will not.
So I went ahead and put together this solution on a Saturday. Enjoy!
##Usage
This is available as a nmp module. Simply install with:
npm install nwjs-osx-menu
Call the module function passing in the window object:
require('nwjs-osx-menu')(window);
On Mac OS X, this call should add an Edit and a Window menu to the application menubar. On other platforms, this call should not modify the application state.