stackphp/stackphp.com — pull request #1 by RobLoach (2013-04-28 05:22:36+00:00)
Title: [WIP] Add use of require.css and require.js

This is more of brainstorm than a pull request. This makes use of [Component Installer](https://github.com/robloach/component-installer)'s generated `require.js` and `require.css`, reducing the micro-management of dependencies, and the amount of HTTP requests.

* `require.css`: Concatenated stylesheet of all Component CSS files
* `require.js`: Built [RequireJS](http://requirejs.org) configuration for loading scripts, along with their dependencies

@simensen and I had troubles getting RequireJS to pick up the correct base URL in Sculpin. We can get around that by telling Sculpin to register it directly in the template:
``` javascript
require.config({
"baseUrl": "{{ site.url }}/components"
});
```

Was trying to use `hljs.initHighlightingOnLoad();` here, and it wasn't quite working because I believe at the time the require callback is made, the page is already loaded and the event has already been triggered. I could be wrong though, but it is working with the following:
``` javascript
require(['highlightjs', 'bootstrap'], function(hljs) {
hljs.initHighlighting();
});
```

Was wondering where this could improve, and was looking for both of your thoughts. I'm trying to get a better understanding of where Component Installer could be better, and how it could satisfy most use cases.

Thanks a lot! Stack looks great :heart: