I’m excited to announce the release of Chirpy v.1.0.0.5–Chirpy to the XXXtreme. That’s right. This version of Chirpy will blow the pants off of every clothed person in the universe. So, if you haven’t gotten dressed already, don’t bother.
Before diving too deep into the realm of the extreme, let me re-divulge the following preface: if you’re completely new to the madness of Chirpy, I recommend that you read about Chirpy’s core features. You can also watch David Ebbo demo Chirpy as a part of his MvcConf presentation. That should get you caught up. And once you’re caught up, come on back to this post.
Another important side-note: Chirpy’s current warp-like maturation is largely due to the superb and continued contributions of Andy Edinborough and Francis Noel. As a thanks for their support, and as an impetus for continued feather-laden progress, I kindly ask that you consider throwing a dollar or two (hundred [thousand]) into our donation hat. Andy, after all, has four children, and each requires at least one plate of sustenance per day. And I, although completely childless, have an insatiable, child-like desire for candy bars and diet Red Bulls.
At the very least, if you have experienced the pleasure of the flightless Chirpy bird (or if you feel like complaining about how crappy Chirpy is), go to Chirpy’s Codeplex page and write a comment or two. Or, if you’d like to follow the project more closely, feel free to follow all of Chirpy’s developers on Twitter.
Alright. Without further ado:
Xxxtreme New Chirpy Features
Let’s start with the obvious: you can download Chirpy v1.0.0.5 here.
Got it? Good.
Now, here’s an overview of all of the new features that you’ve just blessed yourself with. Click on the feature below that most likely suits your fancy, or, if you’re a real sucker for e-pain, you can scroll through the whole document (may God help you) until you reach the very, very end.
- Chirpy Handles Seven New File Extensions
- Chirpy Handles Inline Aspx and Ascx Translation and Minification
- Chirpy’s Source is Now More Modularized and Multi-Threaded
- Chirpy Can Use Google Closure Tools Offline
- Chirpy’s Config Files Now Tote Intellisense
Feature 1: Chirpy Handles Seven New File Extensions
The new extensions include:
- .michaelash.css. Minify your stylesheets using Michael Ash’s Regex enhancements. If you’re unfamiliar with Michael Ash’s Regex CSS enhancements, you can read more about the project here.
- .hybrid.css. Minify your stylesheets with YUI Compressor + Michael Ash’s Regex enhancements.
- .msajax.css. Minify your stylesheets with Ms Ajax Minifier. If you’re unfamiliar with Microsoft’s Ajax Minifier, you can read more about the library here.
- .msajax.js. Minify your javascript files with Ms Ajax Minifier. If you’re unfamiliar with Microsoft’s Ajax Minifier, you can read more about the library here.
- .michaelash.less. Translate your Less files with the DotLess Translator, and minify the outputted CSS file with Michael Ash’s Regex enhancements.
- .hybrid.less. Translate your Less files with the DotLess Translator, and minify the outputted CSS file with YUI Compressor + Michael Ash’s Regex enhancements.
- .msajax.less. Translate your Less files with the DotLess Translator, and minify the outputted CSS file with MS Ajax Minifier.
Feature 2: Chirpy Handles Inline Aspx and Ascx Translation and Minification
Step 1: In your MVC or WebForms project, create a new View. Name the view Test.chirp.aspx:
Step 2: Insert a new inline script into your Test.chirp.aspx file:
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<h2>Test.Chirp.aspx</h2>
<script type="text/javascript">
function thisWillGetMinifiedYo() {
alert("hi");
alert("bye");
}
</script>
</asp:Content>
Step 3: In the codebehind Test.aspx file, you’ll notice that all of your inline javascript has been minified:
Step 4: Now, for the fun part. Let’s create an inline Less tag. And let’s add some less code into our aspx page:
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
<style type="text/less">
@color : #123456;
tag
{
background-color:@color;
}
</style>
</asp:Content>
Step 5: In the codebehind Test.aspx file, you’ll notice that your inline Less code has been translated into minified CSS. Fun for all (don’t mind the mistake here, if you can sniff it out):
Feature 3: Chirpy’s Source is Now More Modularized and Multi-Threaded
It’s easier than ever to add your own translator to Chirpy. For starters, if you haven’t already, download and open Chirpy’s source project (you can download the source at Codeplex). Easy enough. Now, for Step 1, go ahead and open up the project in Visual Studio:
Step 2: Create a new Engine class in the Engines folder. In this example, I’ll create a really simple (read: stupid) Transform Engine:
using System;
namespace Zippy.Chirp.Engines
{
public class TestEngine : TransformEngine
{
public TestEngine()
{
Extensions = new string[] { ".test.moo", ".test.foo" }; //extensions that this engine handles
OutputExtension = ".test"; //outputted extension
}
public override string Transform(string fullFileName, string text, EnvDTE.ProjectItem projectItem)
{
return "//here is the outputted text:" + Environment.NewLine + text;
}
public override void Process(Manager.VSProjectItemManager manager, string fullFileName, EnvDTE.ProjectItem projectItem, string baseFileName, string outputText)
{
//process occurs after transformation
//you can override, if you so choose...
base.Process(manager, fullFileName, projectItem, baseFileName, outputText);
}
}
}
Step 3: Once your Engine class is built, you need to register your new engine in the Chirp class (Chirp.cs):
internal TestEngine TestEngine { get; set; }
public void LoadActions() {
if(_EngineManager == null || _EngineManager.IsDisposed)
_EngineManager = new EngineManager(this);
_EngineManager.Clear();
_EngineManager.Add(YuiCssEngine = new YuiCssEngine());
_EngineManager.Add(YuiJsEngine = new YuiJsEngine());
_EngineManager.Add(ClosureCompilerEngine = new ClosureCompilerEngine());
_EngineManager.Add(LessEngine = new LessEngine());
_EngineManager.Add(MsJsEngine = new MsJsEngine());
_EngineManager.Add(MsCssEngine = new MsCssEngine());
_EngineManager.Add(ConfigEngine = new ConfigEngine());
_EngineManager.Add(ViewEngine = new ViewEngine());
_EngineManager.Add(T4Engine = new T4Engine());
_EngineManager.Add(TestEngine = new TestEngine()); //here's our baby
}
Step 4: Rebuild the vsi package. If you’re not comfortable creating a vsi file manually (as described here), you can automatically generate the vsi file as part of the Build process. Just make sure that the following commands are included in the Post-build event command line:
del “$(ProjectDir)$(OutDir)Chirpy.vsi”
“$(ProjectDir)$(OutDir)\ILMerge” /out:”$(ProjectDir)$(OutDir)Chirpy.dll” “$(TargetPath)” “$(ProjectDir)$(OutDir)EcmaScript.NET.modified.dll” “$(ProjectDir)$(OutDir)Yahoo.YUI.Compressor.dll” “$(ProjectDir)$(OutDir)dotless.Core.dll” “$(ProjectDir)$(OutDir)AjaxMin.dll”
“$(ProjectDir)$(OutDir)7za.exe” u Chirpy.zip “$(ProjectDir)$(OutDir)Chirpy.dll” “$(ProjectDir)$(OutDir)Chirpy.vscontent” “$(ProjectDir)$(OutDir)Zippy.AddIn”
rename “$(ProjectDir)$(OutDir)Chirpy.zip” “Chirpy.vsi”
Step 5: Open the vsi file, and install your customized version of Chirpy!
Step 6: Test out your awesome new engine. For my TestEngine, I created a file with the extension “.test.moo”. As a result, Chirpy creates a codebehind file:
Step 7: Take a look at the codebehind file that Chirpy created. Notice that we “transformed” the .test.moo file by adding a comment at the top of the file:
Step 8: If your engine might be helpful to other developers, please (and I mean PLEASE) consider submitting your addition to the project. I’d be excited to include it. And I’d be forever grateful for your contribution.
Feature 4: Use Google Closure Tools Offline
Though this feature has yet to be integrated into the main Chirpy project, Erik Zaadi has been working on a great Chirpy extension. The extension allows for offline use of Google Closure Tools. If you’re interested in using Erik’s madness, you can read about it here, and you can download the fork at Codeplex.
Feature 5: Chirpy’s Config File Now Totes Intellisense
You can download the XML schema file from here, or, if you’re lazy, you can reference the xsd file thusly:
<?xml version="1.0"?>
<root
xmlns="urn:ChirpyConfig"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:ChirpyConfig http://www.weirdlover.com/chirpy/chirp.xsd">
<FileGroup Name="mash.js" Minify="False">
<File Path="jquery-1.4.2.min.js"/>
<File Path="json2.min.js"/>
</FileGroup>
<FileGroup Name="mash.min.js" Minify="True">
<File Path="jquery-1.4.2.min.js"/>
</FileGroup>
</root>
Once you’ve referenced the xsd file, you’ll get your oh-so-desired intellisense:
That’s it! Once again, Chirpy says: Happy Coding!
Read More
You can leave a response, or trackback from your own site.
32 Responses to “Chirpy to the XXXtreme – v1.0.0.5 Release (Party? NSFW? Eh? Eh?)”
Leave a Reply











Once again, you rocked my world! This tool is awesome.
The translator/engine extensibility points are an awesome addition.
sweettastic!
Hey, so i installed the vsi file, but when i add js files (someFileName.yui.js) i never get the code behind files. Am i missing some key configuration?
[...] Chirpy to the XXXtreme – v1.0.0.5 Release (Party? NSFW? Eh? Eh?) « weirdlover [...]
Is possible to enable google closure simple compression on all files in one FileGroup yet?
This thing is awesome!
But it would be great to have LESS variables in one file, and use them in another. As far as I got, it doesn’t work that way.
@Serge It’s bug (fixed in repository). You can downgrade to 1.04, or wait to new release. I wonder that new fixed release isn’t out yet.
Hey Daniel and Serge,
The newest version of the vsi (1.0.0.5.2) SHOULD have all of the necessary fixes, does it not? The vsi was updated to include fixes from 9/14/10.
Let me know if the issue still exists, and I’ll see what I can do.
Cheers,
Evan
This is a great plugin. Exacly what my team needs.
I tried it out and the mash up using a .chirp.config file worked, once. Now it doesn’t work for my anymore and I don’t know why. I even removed the plug in completely and re-installed it, but that didn’t work. Any insight why this might have happened?
Thanx, it is working now. I didn’t noticed a new version
I have one question, can I use google standard compression in .chirp.config for all files? YUI sucks sometimes, Google is much better.
Ok, MinifyWith=”gctSimple” works, thanx
It seems I need local google compression. Se errors:
Warning file size too large for Google: 786,605
Warning Server error : Too many compiles performed recently. Try again later.
How can I enable client side cimpilation?
Still doesn’t work for me.
I installed the latest version (even built the vsi with the source code), checked that it was enabled, opened an old project and created a test.moo file and some test javascript files and nothing happened. Then I created the chirp.config file and still nothing happened.
What’s the problem ?
I rlly would like to get this working…
Oh,yes, I’m using VS 2010…
Hey dll32,
Is your copy of VS 64-bit? If so, try installing Pawel’s very recent patch for 64 bit: http://chirpy.codeplex.com/SourceControl/changeset/changes/545c2664560a
If not, let me know. And apologies for the issue.
Cheers,
Evan
@dll32
I guess your source files are in UTF-8 with signature. Try resave them with UTF-8 without signature (Files – Advanced Save Options). Then will it work.
I’m not using a 64 bit os. I will now try to resave the source files without ut-8- sig.
Thx for the support.
is there a limit for the T4 file list text box ?
if I put one file name it’s OK, but
I have 32 T4 files in my solution… and apparently there are not runned on build
Super Feature request -> http://www.spritebaker.com/
or this http://github.com/nzakas/cssembed
Just installed “Nude Chirpy v1.0.0.5.3″
application, 354K, uploaded Sun – 70 downloads
Still doesn’t do anything. Weird.Is there a way (in VS) to find out what the problem is ?
dll32, are you working on a “WebSite project” or “WebApplication project”?
if it’s the first one then I’m having the same problem..
files don’t get generated on .js/.css/.less file save
to generate them I have to resave .config file.
is there a way to configure VS to run chipry’s generate event on file save in WebSite project?
I’m using a webapp. Got it working by now. Your advice with saving the config file did the job ! I usually made the mistake to just edit the config file and then build the project … +1
How about a whitespace-remove-feature ?
Once again, I love your style, you’re so cool
great tool!
one question: how to prevent chirpy files from publishing, do I have to set the build action manually?
Hey, great job.
Would love to see this as a package in NuGet now! That would be sweet.
I love this tool!
Is there a way to install the add-in for “all users” of Visual Studio?
Our team works on a shared VM and they all use the same instance of Visual Studio. When running the VSI — the dlls get installed only in my users folder. Consequently every dev has to run the installation VSI if they want to use chirpy. And because the install requires Visual Studio to be shut down — it’s very difficult for a given user to run the install since many devs code on this machine throughout the day.
Any advice you could offer would be greatly appreciated.
Do you have another linke for the David Ebbo’s presentation? Looks like the tekpub link doesn’t work anymore…
Chirpy is awesome! By far, the best minifying/compressing/awesomizing tool for .NET out there!
One problem I’ve noticed is that if any of the file paths in a chirpy config is wrong, it silently fails. Would be great to see an error or warning thrown.
Other than that, awesome
[...] solidifed and released in Chirpy 1.0.0.4. Then, check out the additional features that we added in Chirpy 1.0.0.5. If you’re still not quite convinced that Chirpy will help reinvigorate all of your [...]
This is the file itself; I’ve tried copying the Schema locally, but to no avail…