Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Do not hit git if repository was already checked out

  • Loading branch information...
commit 66e094e9f065211b1378338a810a88d83896867a 1 parent 7c8529b
Worms David authored

Showing 1 changed file with 4 additions and 2 deletions. Show diff stats Hide diff stats

  1. +4 2 lib/dojo.coffee
6 lib/dojo.coffee
@@ -36,8 +36,11 @@ module.exports = (options) ->
36 36 submodules.forEach (submodule) ->
37 37 revision = options[ submodule + '_revision' ] or 'HEAD'
38 38 dirname = 'git-' + submodule + '-' + revision
  39 + mapping[submodule] = options.repository + '/' + dirname
39 40 clone = (next) ->
40 41 path.exists options.repository + '/' + dirname, (exists) ->
  42 + # Unrequired checkout if the directory named after the revision exists
  43 + return _finish() if exists and revision isnt 'HEAD'
41 44 return next() if exists
42 45 url = 'https://github.com/dojo/' + submodule + '.git'
43 46 cmds = []
@@ -57,7 +60,6 @@ module.exports = (options) ->
57 60 return finish err if err
58 61 checkout (err) ->
59 62 return finish err if err
60   - mapping[submodule] = options.repository + '/' + dirname
61 63 _finish()
62 64 else
63 65 throw new Error 'Invalid method option "' + options.method + '" (expects "download")'
@@ -76,7 +78,7 @@ module.exports = (options) ->
76 78 connect.compiler({ src: mapping[app], enable: ['less'] })(req, res, (err) ->
77 79 console.log err if err
78 80 # Static
79   - static = connect.static mapping[app]
  81 + static = connect.static mapping[app]
80 82 static req, res, ->
81 83 req.url = '/' + app + req.url
82 84 next()

0 comments on commit 66e094e

Please sign in to comment.
Something went wrong with that request. Please try again.