def create_packages(config)
      packages = {}
      return packages if !config
      config.each do |name, globs|
        globs                  ||= []
        packages[name]         = {}
        paths                  = globs.flatten.uniq.map {|glob| glob_files(glob) }.flatten.uniq
        packages[name][:paths] = paths
        if !paths.grep(Jammit.template_extension_matcher).empty?
          packages[name][:urls] = paths.grep(JS_EXTENSION).map {|path| path.sub(path_to_url, '') }
          packages[name][:urls] += [Jammit.asset_url(name, Jammit.template_extension)]
        else
          packages[name][:urls] = paths.map {|path| path.sub(path_to_url, '') }
        end
      end
      packages
    end
def create_packages(config)
      packages = {}
      return packages if !config
      config.each do |name, globs|
        globs                  ||= []
        packages[name]         = {}
        paths                  = globs.flatten.uniq.map {|glob| glob_files(glob) }.flatten.uniq
        packages[name][:paths] = paths
        if !paths.grep(Jammit.template_extension_matcher).empty?
          packages[name][:urls] = paths.grep(JS_EXTENSION).map {|path| path.sub(path_to_url, '') }
          packages[name][:urls] += [Jammit.asset_url(name, Jammit.template_extension)]
        else
          packages[name][:urls] = paths.map {|path| path.sub(path_to_url, '') }
        end
      end
      packages
    end
Compiles the list of assets that goes into each package. Runs an
 ordered list of Dir.globs, taking the merged unique result.
 If there are JST files in this package we need to add an extra
 path for when package_assets is off (e.g. in a dev environment).
 This package (e.g. /assets/package-name.jst) will never exist as
 an actual file but will be dynamically generated by Jammit on
 every request.