by jashkenas · 14y ago · 0 comments
> Leveraging the architecture of Bones, our server side
> Backbone.js framework, and the package management API
> of npm, the node package manager, the TileMill UI can
> now be extended and modified using standalone,
> JavaScript plugins.
I'd love to hear more about how exactly this works, if you don't mind sharing. Installing JavaScript plugins into a desktop app via npm sounds like a very neat trick.The npm JS api is quite usable, so it was simply a matter of establishing a directory for plugins (in this case `~/.tilemill/node_modules`) and using the npm API to install, uninstall, etc. plugin packages to there. We identify plugin packages by the `tilemill` tag in the npm repo and each plugin is required to declare their compatibility with a particular tilemill version at the `engines` key.