Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ElvisLives/2704609 to your computer and use it in GitHub Desktop.
Save ElvisLives/2704609 to your computer and use it in GitHub Desktop.
How to add a external url javascript resource that uses a querystring in Cassette
using System.Text.RegularExpressions;
using System.Web.Handlers;
using Cassette;
using Cassette.Configuration;
using Cassette.Scripts;
using Cassette.Stylesheets;
namespace SomeCompany.Web
{
/// <summary>
/// Configures the Cassette asset modules for the web application.
/// </summary>
public class CassetteConfiguration : ICassetteConfiguration
{
public void Configure(BundleCollection bundles, CassetteSettings settings)
{
bundles.AddUrlWithAlias("//ajax.aspnetcdn.com/ajax/jQuery/jquery-1.7.2.min.js", "jquery");
// Line below this comment will let you add the google maps api via Cassette
bundles.AddUrlWithAlias<ScriptBundle>("http://maps.googleapis.com/maps/api/js?sensor=false", "google-maps");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment