docs: function wrapCode(code, entry, opts) {
      var pathAry = entry.file.split('/');
  
      // Don't touch the code if it's in a 'libs' directory
      if (pathAry.indexOf('libs') >= 0) { //TODO [code,libs] & options.dirs.libs location
        return code;
      }
  
      // if it's configured in excludes, return raw code
      if (pathAry.indexOf('entry.js') === -1 && options && options.browserifyExcludePaths) {
        for(var i, p; (p = options.browserifyExcludePaths[i]); ++i) {
          if ( entry.file.split( p )[0] === '' ) {
            return code;
          }
        }
      }
  
      var last = pathAry[pathAry.length-1],
        modPath,
        extPos = last.lastIndexOf('.');
      if (extPos > -1) {
        pathAry[pathAry.length-1] = last.substring(0,extPos);
      }
  
      //TODO configurable system locations with array instead of string
      // Don't add a leading slash if this is a 'system' module
      if (entry.file.indexOf(options.dirs['system'].substring(1)) === 0) { //TODO [code,system] & improve test to allow parallel system dir
        // Take everything after the /system/ part of the path
        modPath = pathAry.slice(pathAry.indexOf('system')+1).join('/');
      } else {
  
        // Otherwise treat as a regular module
        modPath = pathAry.join('/');
  
        // Work out namespace for module
        if (opts.pathPrefix) {
  
          // Ignore any filenames in the path
          if (opts.pathPrefix.indexOf('.') > 0) {
            var sp = opts.pathPrefix.split('/');
            sp.pop();
            opts.pathPrefix = sp.join('/');
          }
          modPath = '/' + path.substr(opts.pathPrefix.length + 1);
        } else {
          modPath = '/' + modPath;
        }
      }
      return ss.bundler.wrapModule(modPath, code);
    }