mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-27 01:25:42 -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'
|
||||
setUpBackboneMediator()
|
||||
app.initialize()
|
||||
loadOfflineFonts() unless app.isProduction()
|
||||
Backbone.history.start({ pushState: true })
|
||||
handleNormalUrls()
|
||||
setUpMoment() # Set up i18n for moment
|
||||
|
@ -125,6 +126,9 @@ setUpIOSLogging = ->
|
|||
catch 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.
|
||||
# We could also keep a list of events we are actually subscribed for and only try to send those over.
|
||||
seen = null
|
||||
|
|
|
@ -112,6 +112,7 @@
|
|||
}
|
||||
},
|
||||
"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:
|
||||
copyTo:
|
||||
'lib/ace': ['node_modules/ace-builds/src-min-noconflict/*']
|
||||
'fonts': ['bower_components/openSansCondensed/*']
|
||||
autoReload:
|
||||
delay: 1000
|
||||
|
||||
|
|
Loading…
Reference in a new issue