jrburke/require-cs — pull request #40 by guybedford (2012-12-08 18:37:43+00:00)
Title: Dynamically load CoffeeScript, as well as a fetchText dependency id adjustment

1. Attached is a pluginBuilder version as described in #38.

I've also updated the `package.json` for volo.

This would simply require a map config from 'cs' to 'require-cs/cs' to work.

2. The other change is that I've been using the `onResourceLoad` api a bit recently, and always need to write exceptions for CoffeeScript to check the underlying module name.

The issue here is that a load to 'cs!my/module' is defined as 'my/module'. So the dependencies are all tracked under 'my/module'. I added the following fix to define the module as `cs!my/module`:

```javascript
load.fromText(module.id + '!' + name, text);
```

where module is the `module` dependency for getting the id of the coffeescript plugin itself.

Both of the above would be incredibly beneficial. Would appreciate your feedback - I understand shifting this module to a pluginbuilder is a big step so I understand if you don't want to make this change, but the issue as described in #38 is solved quite nicely this way.