tyt2y3/requirejs-css-plugin — pull request #3 by inf3rno (2013-06-28 16:02:28+00:00)
Title: Added dependency resolving and debug.

By depdency resolving initialize collects every css!... calls from shim and creates a css file dependency catalog from it. After that the load checks whether all dependencies are loaded. If not it defers the load of the css files until every dependency is loaded.

For example

backboneUI: {
deps: ["css!lib/backbone-ui.css"],
},
Application: {
deps: ["css!skeleton.css","backboneUI","css!backbone-ui-skin.css","domReady!"]
}

The css order here:

skeleton.css, lib/backbone-ui.css, backbone-ui-skin.css

You can check it by debug mode...

require.config({
config: {
css: {
debug: true
}
}
});

Currently this works only if the plugin alias is "css"...

I haven't write the build yet. I never used r.js, so it would be better if someone else would make the build...