chrisjpowers/air-drop — pull request #1 by amelon (2012-06-21 10:12:27+00:00)
Title: make AirDrop windows friendly

## Current issues
### Windows
Currently, AirDrop is not working on windows because of path resolution `path.resolve` (nightmare on windows: path `c:/foo/bar` is resolved as `c:\\foo\\bar`) and it makes bad things on Path AirDrop module.

Second issue on windows is usage of glob.
glob wants input with forward-slach (accept `/foo/bar` and not `\\foo\\bar`). Still path resolution in AirDrop has to fix path before using glob.

Last, but not the least, glob is not working with windows absolute path (eg: `glob('c:/foo/bar')`).

I sent a pull request to glob to fix these issues.

### AirDrop
AirDrop accepts required module to be named:

```javascript
// in your Node script
var package = AirDrop("my-package").require(__dirname + "/../node_modules/underscore/underscore.js", {name: "underscore"});

// in the browser
var _ = require("underscore");
```

But this only works if you use `.package()`. Otherwise option `{name: "foo"}` is ignored.
I've modified `_fetchCode` to send `path.name` when provided.

Actually I'm preparing a AirDropFlatiron module that is an AirDrop for flatiron (using director router and embed AirDrop as a broadway plugin) and already accept the module_name in url.

AirDrop internal routing should be changed accordingly as commented in the code.