span></span> = (source, base, extension=<span class="string">".js"</span>) -&gt;
  basename  = helpers.baseFileName source, <span class="literal">yes</span>, path.sep
  srcDir    = path.dirname source
  baseDir   = <span class="keyword">if</span> base <span class="keyword">is</span> <span class="string">'.'</span> <span class="keyword">then</span> srcDir <span class="keyword">else</span> srcDir.substring base.length
  dir       = <span class="keyword">if</span> opts.output <span class="keyword">then</span> 