isagalaev/highlight.js — pull request #604 by sourrust (2014-10-15 03:20:12+00:00)
Title: Unify exporting in highlight.js' core

This change is mainly to address #597, but there was also this comment in the thread:

> As a sidenote I think you can remove some complexity in the build script by talking a similar approach as underscore where with very little logic the same file is valid in node, the browser and as an amd module. I would be happy to make a PR if you think it's a good idea :)

So I tried it out and it works pretty well. Instead of underscore I took my inspiration from backbone and modified it for a smaller and less repetitive version. So the result is our build script is *slightly* smaller and since our core isn't attaching to `this` multiple times, the compressed version is actually smaller.

```
35426 (size of version 8.3)
35156 (size currently)
```