         if err
           deferred.reject
         else
-          deferred.resolve(data)))
+          deferred.resolve(data, path)))
     return promise
 
 mglob = _.memoize glob.sync
 
 Object.defineProperty Assets.prototype, 'png', {
   get: ->
-    mglob(@assetFolder + '**/*.png', { cwd: @root })
+    mglob(@assetsPath + '**/*.png', { cwd: @root })
   enumerable: true
 }
 


Object.defineProperty Assets.prototype, 'jpg', {
  get: ->
    mglob(@assetFolder + '**/*.jpg', { cwd: @root })
  enumerable: true
}

Object.defineProperty Assets.prototype, 'gif', {
  get: ->
    mglob(@assetFolder + '**/*.gif', { cwd: @root })
  enumerable: true
}

Object.defineProperty Assets.prototype, 'css', {
  get: ->
    mglob(@assetFolder + '**/*.css', { cwd: @root })
  enumerable: true
}

Object.defineProperty Assets.prototype, 'svg', {
  get: ->
    mglob(@assetFolder + '**/*.svg', { cwd: @root })
  enumerable: true
}

Object.defineProperty Assets.prototype, 'js', {
  get: ->
    mglob(@assetFolder + '**/*.js', { cwd: @root })
  enumerable: true
}

Object.defineProperty Assets.prototype, 'ttf', {
  get: ->
    mglob(@assetFolder + '**/*.ttf', { cwd: @root })
  enumerable: true
}

Object.defineProperty Assets.prototype, 'otf', {
  get: ->
    mglob(@assetFolder + '**/*.otf', { cwd: @root })
  enumerable: true
}

Object.defineProperty Assets.prototype, 'woff', {
  get: ->
    mglob(@assetFolder + '**/*.woff', { cwd: @root })
  enumerable: true
}


# Some way to enable single chapter css and js? Is that even necessary?

class Assets
  constructor: (@root, @assetsPath) ->
  pngPromise: () ->
    pglob(@assetsPath + '**/*.png', { cwd: @root })
  jpgPromise: () ->
    pglob(@assetsPath + '**/*.jpg', { cwd: @root })
  gifPromise: () ->
    pglob(@assetsPath + '**/*.gif', { cwd: @root })
  cssPromise: () ->
    pglob(@assetsPath + '**/*.css', { cwd: @root })
  svgPromise: () ->
    pglob(@assetsPath + '**/*.svg', { cwd: @root })
  jsPromise: () ->
    pglob(@assetsPath + '**/*.js', { cwd: @root })
  ttfPromise: () ->
    pglob(@assetsPath + '**/*.ttf', { cwd: @root })
  otfPromise: () ->
    pglob(@assetsPath + '**/*.otf', { cwd: @root })
  woffPromise: () ->
    pglob(@assetsPath + '**/*.woff', { cwd: @root })
  get: (path) ->
    deferred = whenjs.defer()
    promise = deferred.promise
