def template_name(path, base_path)
      return File.basename(path, ".#{Jammit.template_extension}") unless base_path
      path.gsub(/\A#{Regexp.escape(base_path)}\/(.*)\.#{Jammit.template_extension}\Z/, '\1')
    end
def template_name(path, base_path)
      return File.basename(path, ".#{Jammit.template_extension}") unless base_path
      path.gsub(/\A#{Regexp.escape(base_path)}\/(.*)\.#{Jammit.template_extension}\Z/, '\1')
    end
Determine the name of a JS template. If there's a common base path, use
 the namespaced prefix. Otherwise, simply use the filename.