mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 09:35:39 -05:00
Load fonts locally when in development.
This commit is contained in:
parent
509dd5a8f3
commit
38a4ca4ec0
3 changed files with 7 additions and 1 deletions
|
@ -37,6 +37,7 @@ init = ->
|
||||||
app.demoing = _.string.startsWith path, '/demo'
|
app.demoing = _.string.startsWith path, '/demo'
|
||||||
setUpBackboneMediator()
|
setUpBackboneMediator()
|
||||||
app.initialize()
|
app.initialize()
|
||||||
|
loadOfflineFonts() unless app.isProduction()
|
||||||
Backbone.history.start({ pushState: true })
|
Backbone.history.start({ pushState: true })
|
||||||
handleNormalUrls()
|
handleNormalUrls()
|
||||||
setUpMoment() # Set up i18n for moment
|
setUpMoment() # Set up i18n for moment
|
||||||
|
@ -125,6 +126,9 @@ setUpIOSLogging = ->
|
||||||
catch e
|
catch e
|
||||||
webkit?.messageHandlers?.consoleLogHandler?.postMessage level: level, arguments: ['could not post log: ' + e]
|
webkit?.messageHandlers?.consoleLogHandler?.postMessage level: level, arguments: ['could not post log: ' + e]
|
||||||
|
|
||||||
|
loadOfflineFonts = ->
|
||||||
|
$('head').prepend '<link rel="stylesheet" type="text/css" href="/fonts/openSansCondensed.css">'
|
||||||
|
|
||||||
# This is so hacky... hopefully it's restrictive enough to not be slow.
|
# This is so hacky... hopefully it's restrictive enough to not be slow.
|
||||||
# We could also keep a list of events we are actually subscribed for and only try to send those over.
|
# We could also keep a list of events we are actually subscribed for and only try to send those over.
|
||||||
seen = null
|
seen = null
|
||||||
|
|
|
@ -112,6 +112,7 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"modernizr-mixin": "~3.0.0"
|
"modernizr-mixin": "~3.0.0",
|
||||||
|
"openSansCondensed": "https://google-fonts.azurewebsites.net/googleFonts/openSansCondensed?family=Open+Sans+Condensed:700&subset=latin,latin-ext,cyrillic-ext,greek-ext,greek,vietnamese,cyrillic"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -203,6 +203,7 @@ exports.config =
|
||||||
assetsmanager:
|
assetsmanager:
|
||||||
copyTo:
|
copyTo:
|
||||||
'lib/ace': ['node_modules/ace-builds/src-min-noconflict/*']
|
'lib/ace': ['node_modules/ace-builds/src-min-noconflict/*']
|
||||||
|
'fonts': ['bower_components/openSansCondensed/*']
|
||||||
autoReload:
|
autoReload:
|
||||||
delay: 1000
|
delay: 1000
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue