LearnBoost/browserbuild — pull request #27 by fnogatz (2013-02-06 17:47:37+00:00)
Title: Added possibility to rename main method

I've added a browserify-like way to rename the exported main method for the browser. Currently, if you browserbuild your module by `browserbuild -m mymain mymain.js > browser.js`, it will add a mymain object to the browser's global `window` object:

```

```

This is a little bit annoying if your main entry point is called something unspecific like `index`.

With this PR you will be able to rename the main object by using `browserbuild -m mymain:youralias mymain.js > browser.js`.

This additionally makes it possible to also use entry points with hyphen in it, which will result in syntax errors in the current version as they aren't valid variable names.

Greetings,
Falco