     for own transformName, transformOptions of browserifyOptions.transforms
       browserify.transform transformName, transformOptions
 
-    # run the envify transform
+    # run the envify transform now (so it's last)
     browserify.transform envify envifyOptions
 
     return
 
+
   getBundle: (browserify, file) ->
+
     # have browserify process the file and include all required modules.
     # we receive a readable stream as the result
     bundle = browserify.bundle()

      # TODO: modified time of npm-shrinkwrap.json file OR hash of contents
    ]

  compileResultSize: (compileResult) ->
    compileResult.source.length + compileResult.sourceMap.length

  addCompileResult: (file, compileResult) ->
    file.addJavaScript

      ref: if optionInputFile? then [optionFileKey] else []
      package: file.getFileOptions()


  #  1. returns '' for an app file, unless altPackageName exists
  #  2. returns 'packages/packageFolderName' for package files
  #  3. when altPackageName exists and it's an app file, it's used as the packageFolderName
  getRoot: (altPackageName) ->

    root = @getPackageName()
    if root?
      index = root.indexOf(':') + 1
