def sprockets_build(sprocket_assets = [:javascripts, :stylesheets])
      sprocket_assets.each do |asset_type|
        load_path = File.join(@project_root, asset_type.to_s)
        next unless File.exists?(load_path)
        sprockets_env.append_path load_path
        Dir.new(load_path).each do |filename|
          file = File.join(load_path, filename)
          if File.file?(file)
            asset = sprockets_env[filename]
            attributes = sprockets_env.find_asset(asset.pathname)
            # logical_path is the filename
            build_file = File.join(build_path, asset_type.to_s, attributes.logical_path)
            File.open(build_file, 'w') do |f|
              extension = attributes.logical_path.split(".").last
              f.write(minify(asset, extension))
            end
          end
        end
      end
    end
def sprockets_build(sprocket_assets = [:javascripts, :stylesheets])
      sprocket_assets.each do |asset_type|
        load_path = File.join(@project_root, asset_type.to_s)
        next unless File.exists?(load_path)
        sprockets_env.append_path load_path
        Dir.new(load_path).each do |filename|
          file = File.join(load_path, filename)
          if File.file?(file)
            asset = sprockets_env[filename]
            attributes = sprockets_env.find_asset(asset.pathname)
            # logical_path is the filename
            build_file = File.join(build_path, asset_type.to_s, attributes.logical_path)
            File.open(build_file, 'w') do |f|
              extension = attributes.logical_path.split(".").last
              f.write(minify(asset, extension))
            end
          end
        end
      end
    end
Public function for building sprockets assets and minifying