linkedin/archetype — pull request #72 by eoneill (2014-03-20 10:47:50+00:00)
Title: support for runtime locale values and glyph library registries

## runtime locale support
`runtime-locale-value` and `get-runtime-locale-value` can be used to convert a map into a decorated map that archetype understand how to evaluate at runtime

Previously, you would do something like...
```scss
$config: if(lang(xx_YY), a, b);
...
value: $config;
```

This works when you only have a single locale context to worry about, but if you used `switch-locale`, you wouldn't be able to support dynamic locale changes...

Let's first assume we have this mixin, which we can't modify because it's controlled by some other file/library:
```scss
@mixin show-value($value) {
value: $value;
}
```
now assume there's this `$config`, that's shared and we don't want to duplicate a bunch of locale logic across all our files
```scss
$config: if(lang(xx_YY), b, a);
```
makes sense, so let's combine the two...
```scss
.test {
@include show-value($config);
&.xx_YY {
@include switch-locale(xx_YY) {
@include show-value($config);
};
}
}
```
this would output the following, not what we want :(...
```css
.test { value: a; }
.test.xx_YY { value: a; }
```
with runtime locale evaluation, you can change this to...
```scss
$config: runtime-locale-value((
default: a,
xx_YY: b
));
.test {
@include show-value(get-runtime-locale-value($config));
&.xx_YY {
@include switch-locale(xx_YY) {
@include show-value(get-runtime-locale-value($config));
};
}
}
```
and get the desired output of...
```css
.test { value: a; }
.test.xx_YY { value: b; }
```
You really only need this when working with multi-locale interfaces and leveraging `switch-locale`.

This functionality has been integrated with `styleguide`, `glyph-icon`, and `to-styles` directly.

## glyph library registries
`register-glyph-library` and `get-glyph-library` make it easier to define the set of glyphs you'll be using. No more having to fumble around with `$CONFIG_GLYPH_LIBRARIES`