Created
March 10, 2016 19:19
-
-
Save AndrewCraswell/fa9a999748ad34989847 to your computer and use it in GitHub Desktop.
A controller in ASP.NET 4.5 that returns a bundle config file generated by the gulp-bundle-assets package.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Newtonsoft.Json; | |
using Newtonsoft.Json.Linq; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Web.Mvc; | |
namespace DurandalTest.Controllers { | |
public class DurandalController : Controller { | |
public ActionResult Index() { | |
dynamic bundles; | |
using (StreamReader sr = new StreamReader(Server.MapPath("~/dist/bundle.result.json"))) | |
{ | |
bundles = JObject.Parse(sr.ReadToEnd()); | |
} | |
return View(bundles); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment