curl.js 0.8.4
introduces a new feature: bootstrapping via HTML attribute!
If you're familiar with RequireJS's `data-main` feature, then you're already familiar with the concept. In short, a special HTML attribute tells curl.js where the bootstrap script (aka "run.js") can be found. All of the information needed to configure and start the application is inside the run.js file.
So, why not use `data-main` like other AMD loaders?
curl.js looks for the HTML attribute `data-curl-run` rather than `data-main` for three important reasons:
1. RequireJS (and other AMD loaders) don't clean up `data-main` after using it. Subsequent loaders on the page could accidentally use it again!
2. curl.js allows more than one run.js file to be specified in the attribute. This feature is designed to allow you to quickly toggle between a standalone run.js and a bundle file without changing the HTML source.
3. The W3C highly recommends that `data-*` attributes be namespaced, so all curl-specific attributes should start with `data-curl-`.
More information is on the
wiki.