Skip to content

Commit

Permalink
update AjaxMin reference (jetheredge#261, jetheredge#319)
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexCuse committed Dec 23, 2015
1 parent 7df2a5a commit 50025d6
Show file tree
Hide file tree
Showing 28 changed files with 107 additions and 29 deletions.
3 changes: 1 addition & 2 deletions SquishIt.Framework/Minifiers/JavaScript/MsMinifier.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ public string Minify(string content)
{
var minifer = new Minifier();
codeSettings = codeSettings ?? new CodeSettings();
codeSettings.SetKnownGlobalNames(globalNames);

globalNames.ForEach(gn => codeSettings.AddKnownGlobal(gn));
return minifer.MinifyJavaScript(content, codeSettings);
}
}
Expand Down
6 changes: 3 additions & 3 deletions SquishIt.Framework/SquishIt.Framework.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,9 @@
<DocumentationFile>bin\Release\SquishIt.Framework.XML</DocumentationFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="AjaxMin">
<HintPath>..\packages\AjaxMin.5.14.5506.26202\lib\net35\AjaxMin.dll</HintPath>
</Reference>
<Reference Include="EcmaScript.NET, Version=1.0.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\EcmaScript.Net.1.0.1.0\lib\net20\EcmaScript.NET.dll</HintPath>
</Reference>
Expand All @@ -66,9 +69,6 @@
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="System.Configuration" />
<Reference Include="AjaxMin">
<HintPath>..\packages\AjaxMin.4.48.4489.28432\lib\net20\AjaxMin.dll</HintPath>
</Reference>
<Reference Include="Yahoo.Yui.Compressor, Version=2.3.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\YUICompressor.NET.2.3.0.0\lib\NET20\Yahoo.Yui.Compressor.dll</HintPath>
Expand Down
2 changes: 1 addition & 1 deletion SquishIt.Framework/packages.config
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="AjaxMin" version="4.48.4489.28432" />
<package id="AjaxMin" version="5.14.5506.26202" targetFramework="net35" />
<package id="EcmaScript.Net" version="1.0.1.0" targetFramework="net35" />
<package id="YUICompressor.NET" version="2.3.0.0" targetFramework="net35" />
</packages>
2 changes: 1 addition & 1 deletion SquishIt.Tests/CSSBundleTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1189,7 +1189,7 @@ public void CanMaintainOrderBetweenArbitraryAndFileAssetsInRelease()
var file2 = "anotherfile.css";

var arbitraryCss = ".someClass { color:red }";
var minifiedArbitraryCss = ".someClass{color:red}";
var minifiedArbitraryCss = ".someClass{color:#f00}";

var readerFactory = new StubFileReaderFactory();
readerFactory.SetContentsForFile(TestUtilities.PrepareRelativePath(file1), css);
Expand Down
2 changes: 1 addition & 1 deletion SquishIt.Tests/HoganTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void CanBundleJavascriptInRelease(Type preprocessorType)

//are minifier's optimizations here OK?
var compiled =
@"var JST=JST||{};JST.test=new Hogan.Template(function(n,t,i){var r=this;return r.b(i=i||""""),r.b(""<h1>""),r.b(r.v(r.f(""message"",n,t,0))),r.b(""</h1>""),r.fl()},""" + template + "\",Hogan,{});";
@"var JST=JST||{};JST.test=new Hogan.Template(function(n,t,i){var r=this;return r.b(i=i||""""),r.b(""<h1>""),r.b(r.v(r.f(""message"",n,t,0))),r.b(""<\/h1>""),r.fl()},""" + template.Replace("/", @"\/") + "\",Hogan,{});";

Assert.AreEqual(1, writerFactory.Files.Count);
var expectedTag = "<script type=\"text/javascript\" src=\"template.js?r=hash\"></script>";
Expand Down
2 changes: 1 addition & 1 deletion SquishIt.Tests/SassTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ public void CanUseSelectorInheritance()
}";

var expected =
@".error,.badError{border:1px red;background:#fdd}.error.intrusion,.intrusion.badError{font-size:1.3em;font-weight:bold}.badError{border-width:3px}";
@".error,.badError{border:1px #f00;background:#fdd}.error.intrusion,.intrusion.badError{font-size:1.3em;font-weight:bold}.badError{border-width:3px}";

var cssBundle = cssBundleFactory
.WithHasher(hasher)
Expand Down
4 changes: 2 additions & 2 deletions nuspec/squishit.coffeescript.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>SquishIt.CoffeeScript</id>
<version>0.9.8.1-beta1</version>
<version>1.0.0-alpha2</version>
<authors>Justin Etheredge, Alex Ullrich, Rodrigo Dumont</authors>
<owners>Justin Etheredge, Alex Ullrich</owners>
<projectUrl>https://github.com/jetheredge/SquishIt</projectUrl>
<licenseUrl>https://github.com/jetheredge/SquishIt/blob/master/license.txt</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Adds CoffeeScript processing capability to SquishIt.</description>
<dependencies>
<dependency id="SquishIt" version="0.9.8.1-beta1" />
<dependency id="SquishIt" version="1.0.0-alpha2" />
<dependency id="Jurassic" version="2.1.1" />
<dependency id="WebActivator" version="1.4" />
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions nuspec/squishit.hogan.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>SquishIt.Hogan</id>
<version>0.9.8.1-beta1</version>
<version>1.0.0-alpha2</version>
<authors>Justin Etheredge, Alex Ullrich, Abdrashitov Vadim</authors>
<owners>Justin Etheredge, Alex Ullrich</owners>
<projectUrl>https://github.com/jetheredge/SquishIt</projectUrl>
<licenseUrl>https://github.com/jetheredge/SquishIt/blob/master/license.txt</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Adds Hogan processing capability to SquishIt.</description>
<dependencies>
<dependency id="SquishIt" version="0.9.8.1-beta1" />
<dependency id="SquishIt" version="1.0.0-alpha2" />
<dependency id="Jurassic" version="2.1.1" />
<dependency id="WebActivator" version="1.4" />
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions nuspec/squishit.less.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>SquishIt.Less</id>
<version>0.9.8.1-beta1</version>
<version>1.0.0-alpha2</version>
<authors>Justin Etheredge, Alex Ullrich, Rodrigo Dumont</authors>
<owners>Justin Etheredge, Alex Ullrich</owners>
<projectUrl>https://github.com/jetheredge/SquishIt</projectUrl>
<licenseUrl>https://github.com/jetheredge/SquishIt/blob/master/license.txt</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Adds LESS processing capability to SquishIt.</description>
<dependencies>
<dependency id="SquishIt" version="0.9.8.1-beta1" />
<dependency id="SquishIt" version="1.0.0-alpha2" />
<dependency id="dotless" version="1.4.1.0" />
<dependency id="WebActivator" version="1.4" />
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions nuspec/squishit.msiecoffeescript.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>SquishIt.MsIeCoffeeScript</id>
<version>0.9.8.1-beta1</version>
<version>1.0.0-alpha2</version>
<authors>Justin Etheredge, Alex Ullrich, Alexey Gorbach</authors>
<owners>Justin Etheredge, Alex Ullrich</owners>
<projectUrl>https://github.com/jetheredge/SquishIt</projectUrl>
<licenseUrl>https://github.com/jetheredge/SquishIt/blob/master/license.txt</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Adds CoffeeScript processing capability to SquishIt using Internet Explorer's javascript engine.</description>
<dependencies>
<dependency id="SquishIt" version="0.9.8.1-beta1" />
<dependency id="SquishIt" version="1.0.0-alpha2" />
<dependency id="MsIeJavaScriptEngine" version="1.1.1" />
<dependency id="WebActivator" version="1.4" />
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions nuspec/squishit.msiehogan.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>SquishIt.MsIeHogan</id>
<version>0.9.8.1-beta1</version>
<version>1.0.0-alpha2</version>
<authors>Justin Etheredge, Alex Ullrich</authors>
<owners>Justin Etheredge, Alex Ullrich</owners>
<projectUrl>https://github.com/jetheredge/SquishIt</projectUrl>
<licenseUrl>https://github.com/jetheredge/SquishIt/blob/master/license.txt</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Adds Hogan processing capability to SquishIt using Internet Explorer's javascript engine.</description>
<dependencies>
<dependency id="SquishIt" version="0.9.8.1-beta1" />
<dependency id="SquishIt" version="1.0.0-alpha2" />
<dependency id="MsIeJavaScriptEngine" version="1.1.1" />
<dependency id="WebActivator" version="1.4" />
</dependencies>
Expand Down
4 changes: 2 additions & 2 deletions nuspec/squishit.mvc.nuspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<package>
<metadata>
<id>SquishIt.Mvc</id>
<version>0.9.8.1-beta1</version>
<version>1.0.0-alpha2</version>
<authors>Justin Etheredge, Alex Ullrich</authors>
<owners>Justin Etheredge, Alex Ullrich</owners>
<description>
Expand All @@ -10,7 +10,7 @@
<projectUrl>https://github.com/jetheredge/SquishIt</projectUrl>
<licenseUrl>https://github.com/jetheredge/SquishIt/blob/master/license.txt</licenseUrl>
<dependencies>
<dependency id="SquishIt" version="0.9.8.1-beta1" />
<dependency id="SquishIt" version="1.0.0-alpha2" />
</dependencies>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions nuspec/squishit.nsass.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>SquishIt.NSass</id>
<version>0.9.8.1-beta1</version>
<version>1.0.0-alpha2</version>
<authors>Josh Kodroff, Alex Ullrich</authors>
<owners>Justin Etheredge, Alex Ullrich</owners>
<projectUrl>https://github.com/jetheredge/SquishIt</projectUrl>
Expand All @@ -13,7 +13,7 @@
Use this package if you require faster or more up to date SCSS support and don't need to support the legacy SASS file extension.
</description>
<dependencies>
<dependency id="SquishIt" version="0.9.8.1-beta1" />
<dependency id="SquishIt" version="1.0.0-alpha2" />
<dependency id="NSass.Core" version="0.0.3.0" />
<dependency id="WebActivator" version="1.4" />
</dependencies>
Expand Down
11 changes: 7 additions & 4 deletions nuspec/squishit.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>SquishIt</id>
<version>0.9.8.1-beta1</version>
<version>1.0.0-alpha2</version>
<authors>Justin Etheredge, Alex Ullrich</authors>
<owners>Justin Etheredge, Alex Ullrich</owners>
<projectUrl>https://github.com/jetheredge/SquishIt</projectUrl>
<licenseUrl>https://github.com/jetheredge/SquishIt/blob/master/license.txt</licenseUrl>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>SquishIt lets you easily compress and combine JavaScript and CSS.</description>
<releaseNotes>If you are upgrading from SquishIt 0.8.x (and earlier) releases this update breaks support for less and coffeescript file processing. If you use either of these facilities, please install SquishIt.Less or SquishIt.CoffeeScript to enable correct preprocessing of your files.</releaseNotes>
<releaseNotes>If you are upgrading from SquishIt 0.8.x (and earlier) releases this update breaks support for less and coffeescript file processing. If you use either of these facilities, please install SquishIt.Less or SquishIt.CoffeeScript to enable correct preprocessing of your files.

If you are upgrading from SquishIt 0.9.x (and earlier) this update will bring a new version of the AjaxMin library with it.
</releaseNotes>
<dependencies>
<dependency id="YUICompressor.NET" version="2.0.0.0" />
<dependency id="AjaxMin" version="[4.48.4489.28432,4.97.4951.28483]" />
<dependency id="YUICompressor.NET" version="2.3.0.0" />
<dependency id="AjaxMin" version="5.14.5506.26202" />
</dependencies>
</metadata>
<files>
Expand Down
4 changes: 2 additions & 2 deletions nuspec/squishit.sass.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
<metadata>
<id>SquishIt.Sass</id>
<version>0.9.8.1-beta1</version>
<version>1.0.0-alpha2</version>
<authors>Justin Etheredge, Alex Ullrich, Rodrigo Dumont</authors>
<owners>Justin Etheredge, Alex Ullrich</owners>
<projectUrl>https://github.com/jetheredge/SquishIt</projectUrl>
Expand All @@ -13,7 +13,7 @@
SASS / SCSS compilation is performed by libsass-net, a .net wrapper around the libsass engine.
</description>
<dependencies>
<dependency id="SquishIt" version="0.9.8.1-beta1" />
<dependency id="SquishIt" version="1.0.0-alpha2" />
<dependency id="libsassnet" version="3.0" />
<dependency id="WebActivator" version="1.4" />
</dependencies>
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
38 changes: 38 additions & 0 deletions packages/AjaxMin.5.14.5506.26202/tools/net35/AjaxMin.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<UsingTask AssemblyFile="AjaxMinTask.dll" TaskName="AjaxMin" />
<UsingTask AssemblyFile="AjaxMinTask.dll" TaskName="AjaxMinBundleTask" />
<UsingTask AssemblyFile="AjaxMinTask.dll" TaskName="AjaxMinManifestTask" />
<UsingTask AssemblyFile="AjaxMinTask.dll" TaskName="AjaxMinManifestCleanTask" />

<PropertyGroup>
<!-- if the project has a Content folder, we want that to be the root output; otherwise just dump everything relative to the project root -->
<AjaxMinOutputFolder Condition="$(AjaxMinOutputFolder)=='' and Exists('$(ProjectDir)Content\')">$(ProjectDir)Content\</AjaxMinOutputFolder>
<AjaxMinOutputFolder Condition="$(AjaxMinOutputFolder)==''">$(ProjectDir)</AjaxMinOutputFolder>

<!-- default is to NOT treat warnings as errors -->
<AjaxMinTreatWarningsAsErrors Condition="$(AjaxMinTreatWarningsAsErrors)==''">false</AjaxMinTreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<AjaxMinManifests Include="**/*.ajaxmin"/>
</ItemGroup>

<!-- target to clean output for all ajaxmin manifest files in the project -->
<Target Name="CleanAjaxMinManifests" AfterTargets="Clean" Inputs="@AjaxMinManifests" Outputs="@(AjaxMinManifests->'%(FullPath).cleantrigger')">
<Message Text="Cleaning AjaxMin Manifests" Importance="high" />
<AjaxMinManifestCleanTask OutputFolder="$(AjaxMinOutputFolder)" Manifests="@(AjaxMinManifests)" />
</Target>

<!-- target to build all ajaxmin manifest files in the project -->
<Target Name="BuildAjaxMinManifests" AfterTargets="Build" Inputs="@AjaxMinManifests" Outputs="@(AjaxMinManifests->'%(FullPath).buildtrigger')">
<Message Text="Processing AjaxMin Manifests" Importance="high" />
<AjaxMinManifestTask ProjectDefaultSwitches="-define:$(DefineConstants) $(AjaxMinProjectDefaultSwitches)"
Configuration="$(Configuration)"
TreatWarningsAsErrors="$(AjaxMinTreatWarningsAsErrors)"
InputFolder="$(ProjectDir)"
OutputFolder="$(AjaxMinOutputFolder)"
Manifests="@(AjaxMinManifests)" />
</Target>
</Project>
Binary file not shown.
Binary file not shown.
38 changes: 38 additions & 0 deletions packages/AjaxMin.5.14.5506.26202/tools/net40/AjaxMin.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

<UsingTask AssemblyFile="AjaxMinTask.dll" TaskName="AjaxMin" />
<UsingTask AssemblyFile="AjaxMinTask.dll" TaskName="AjaxMinBundleTask" />
<UsingTask AssemblyFile="AjaxMinTask.dll" TaskName="AjaxMinManifestTask" />
<UsingTask AssemblyFile="AjaxMinTask.dll" TaskName="AjaxMinManifestCleanTask" />

<PropertyGroup>
<!-- if the project has a Content folder, we want that to be the root output; otherwise just dump everything relative to the project root -->
<AjaxMinOutputFolder Condition="$(AjaxMinOutputFolder)=='' and Exists('$(ProjectDir)Content\')">$(ProjectDir)Content\</AjaxMinOutputFolder>
<AjaxMinOutputFolder Condition="$(AjaxMinOutputFolder)==''">$(ProjectDir)</AjaxMinOutputFolder>

<!-- default is to NOT treat warnings as errors -->
<AjaxMinTreatWarningsAsErrors Condition="$(AjaxMinTreatWarningsAsErrors)==''">false</AjaxMinTreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup>
<AjaxMinManifests Include="**/*.ajaxmin"/>
</ItemGroup>

<!-- target to clean output for all ajaxmin manifest files in the project -->
<Target Name="CleanAjaxMinManifests" AfterTargets="Clean" Inputs="@AjaxMinManifests" Outputs="@(AjaxMinManifests->'%(FullPath).cleantrigger')">
<Message Text="Cleaning AjaxMin Manifests" Importance="high" />
<AjaxMinManifestCleanTask OutputFolder="$(AjaxMinOutputFolder)" Manifests="@(AjaxMinManifests)" />
</Target>

<!-- target to build all ajaxmin manifest files in the project -->
<Target Name="BuildAjaxMinManifests" AfterTargets="Build" Inputs="@AjaxMinManifests" Outputs="@(AjaxMinManifests->'%(FullPath).buildtrigger')">
<Message Text="Processing AjaxMin Manifests" Importance="high" />
<AjaxMinManifestTask ProjectDefaultSwitches="-define:$(DefineConstants) $(AjaxMinProjectDefaultSwitches)"
Configuration="$(Configuration)"
TreatWarningsAsErrors="$(AjaxMinTreatWarningsAsErrors)"
InputFolder="$(ProjectDir)"
OutputFolder="$(AjaxMinOutputFolder)"
Manifests="@(AjaxMinManifests)" />
</Target>
</Project>
Binary file not shown.

0 comments on commit 50025d6

Please sign in to comment.