HumbleSoftware/Flotr2 — pull request #225 by epeli (2013-06-05 15:55:46+00:00)
Title: Add build without 3rd party libs

This build expects to find Underscore and Bean libraries as globals by
the time it is loaded. This is very useful for those how want to take
greater control of the libraries used.

Using this build RequireJS and Browserify users can manually setup a
shim configs for Flotr2.

Here's something you might want to add to documentation:

## Browserify Example

`flotr2.shim.js`
```javascript
// Expose Underscore and Bean as globals from npm
window._ = require("underscore");
window.bean = require("bean");

// Require Flotr2 expecting the globals
require("./flotr2.nolibs");

// Export it as a module for convenience
module.exports = window.Flotr;
```

## RequireJS Example

```javascript
require.config({
shim: {
"flotr2": {
deps: ["underscore", "bean"],
exports: "Flotr"
},
"underscore": {
exports: "_"
}
},
paths: {
"flotr2": "vendor/flotr2.nolibs",
"underscore": "vendor/underscore",
"bean": "vendor/bean"
}
});
```
Bean is a AMD module so no need to shim it like Underscore.