Merge pull request #2168 from yaur/master

Fix windows build
This commit is contained in:
Nick Winter 2015-01-28 17:52:49 -08:00
commit f9d2a06379
2 changed files with 12 additions and 8 deletions

View file

@ -94,9 +94,17 @@ module.exports = class LevelGuideView extends CocoView
window.tracker?.trackEvent 'Finish help video', level: @levelID, ls: @sessionID, style: @helpVideos[@helpVideosIndex].style
@trackedHelpVideoFinish = true
# we wan't to always use the same scheme (HTTP/HTTPS) as the page was loaded with, but don't want to require Artisans to have to remember
# not to include a scheme in help video url
fixupUri = (uri) ->
n = uri.indexOf('/')
if n < 1
return uri
return uri.slice(n)
setupVideoPlayer: () ->
return unless @helpVideos.length > 0
helpVideoURL = @helpVideos[@helpVideosIndex].url
helpVideoURL = fixupUri(@helpVideos[@helpVideosIndex].url)
@setupVimeoVideoPlayer helpVideoURL
setupVimeoVideoPlayer: (helpVideoURL) ->

View file

@ -8,7 +8,7 @@ TRAVIS = process.env.COCO_TRAVIS_TEST
#- regJoin replace a single '/' with '[\/\\]' so it can handle either forward or backslash
regJoin = (s) -> new RegExp(s.replace(/\//, '[\\\/\\\\]'))
regJoin = (s) -> new RegExp(s.replace(/\//g, '[\\\/\\\\]'))
#- Build the config
@ -197,12 +197,8 @@ exports.config =
modules:
definition: (path, data) ->
needHeaders = [
'public/javascripts/app.js'
'public/javascripts/world.js'
'public/javascripts/whole-app.js'
]
defn = if path in needHeaders then commonjsHeader else ''
needHeaderExpr = regJoin('^public/javascripts/?(app.js|world.js|whole-app.js)')
defn = if path.match(needHeaderExpr) then commonjsHeader else ''
return defn
#- Find all .coffee and .jade files in /app