refactor(caching): cache emojis and remove gemoji from bower

This commit is contained in:
Matteo Pagliazzi 2014-02-12 15:21:40 +01:00
parent 8fdc5327e9
commit fef858d555
3 changed files with 3 additions and 2 deletions

View file

@ -36,7 +36,6 @@
"JavaScriptButtons": "git://github.com/paypal/JavaScriptButtons.git#master",
"Angular-At-Directive": "git://github.com/snicker/Angular-At-Directive#master",
"js-emoji": "git://github.com/snicker/js-emoji#master",
"gemoji": "git://github.com/github/gemoji",
"sticky": "*",
"swagger-ui": "https://github.com/wordnik/swagger-ui.git#105c516f5f055b140e935e9cfe0c36f841921dff",
"ngInfiniteScroll": "~1.0.0",

View file

@ -116,7 +116,9 @@ if (cluster.isMaster && (isDev || isProd)) {
app.use(app.router);
var maxAge = isProd ? 31536000000 : 0;
// Cache emojis without copying them to build, they are too many
app.use(express['static'](path.join(__dirname, "/../build"), { maxAge: maxAge }));
app.use('/bower_components/habitrpg-shared/img/emoji/unicode', express['static'](path.join(__dirname, "/../public/bower_components/habitrpg-shared/img/emoji/unicode"), { maxAge: maxAge }));
app.use(express['static'](path.join(__dirname, "/../public")));
// Custom Directives

View file

@ -14,8 +14,8 @@
p
| 
=env.t('noChallenges')
| 
a.label.label-primary(ui-sref='options.social.challenges')
| 
span.glyphicon.glyphicon-bullhorn
| 
=env.t('challenges')