Mike-Ward.Net
Home Desk Drive Tweetz Simply Weather VSColorOutput FreeSnap Calendar Gadgets Downloads About
July 18, 2014  |  

Friday Links #313

Programming

Applications

Science and Technology

On the Web

      Stuff I Just Like


      July 11, 2014  |  

      Friday Links #312

      Programming

      Applications

      Science and Technology

      On the Web

      Stuff I Just Like

      Favorite Tweets


      The surprising ages of the Founding Fathers on July 4, 1776,  Thanks @jkottke - Chris Boden


      July 4, 2014  |  

      Friday Links #311

      Programming

      Applications

      Science and Technology

      On the Web

      Stuff I Just Like

      Favorite Tweets

      • A user interface is like a joke. If you have to explain it, it’s not that good. - Martin LeBlanc
      • BREAKING: FIFA confirms #WorldCup #USAvsBEL game really a Facebook experiment to get Americans interested in soccer, crush their souls - Kurt Gessler
      • OH: "There's no problem that can't be made worse by the judicious application of Sharepoint." - Brad Wilson

      July 1, 2014  |  

      Introducing Nancy.Pile

      Nancy.Pile is a super simple asset bundler for NancyFx.

      Features

      • Concats and minifies style sheets and javascript files.
      • Won't minify files with ".min." in the file name.
      • Nuget package or include a single file in your current package.
      • Detects when files change.
      • Wild card file matching with duplicate detection (useful when ordering matters)
      • Uncompressed bundles insert comment with file name for each file for easier debugging.

      Install

      PM> Install-Package Nancy.Pile

      Example Usage

      public class Bootstrapper : DefaultNancyBootstrapper
      {
          protected override void ConfigureConventions(NancyConventions nancyConventions)
          {
              base.ConfigureConventions(nancyConventions);
      
              nancyConventions.StaticContentsConventions.AddStylesBundle("styles.css", true,
                  new[]
                  {
                      "css/pure.css",
                      "css/*.css"
                  });
      
              nancyConventions.StaticContentsConventions.AddScriptsBundle("scripts.js", true,
                  new[]
                  {
                      "js/third-party/*.js",
                      "js/app.js",
                      "js/app/*.js"
                  });
          }
      }

      And reference the bundles in html

      <html lang="en">
      <head>
        <meta charset="utf-8" />
        <title>Nancy.Pile.Sample</title>
        <link href="~/styles.css" rel="stylesheet" />
        <script src="~/scripts.js"></script>
      </head>

      previous | next