Skip to content

Commit

Permalink
Updated demo projects to use new Rejuicer nuget package and webactiva…
Browse files Browse the repository at this point in the history
…tor.
  • Loading branch information
skroonenburg committed Nov 6, 2011
1 parent 68fcd6e commit f76477a
Show file tree
Hide file tree
Showing 44 changed files with 205 additions and 80 deletions.
24 changes: 24 additions & 0 deletions Demos/Mvc/MvcDemo/MvcDemo/App_Start/Rejuicer.cs
@@ -0,0 +1,24 @@
using Rejuicer;

[assembly: WebActivator.PostApplicationStartMethod(typeof(MvcDemo.App_Start.RejuicerContent), "Configure")]
namespace MvcDemo.App_Start
{
public static class RejuicerContent
{
public static void Configure()
{
OnRequest.ForJs("~/Combined-{0}.js")
.Compact
.FilesIn("~/Scripts/")
.Matching("*.js")
.FilesIn("~/Scripts/")
.Matching("*.coffee")
.Configure();

OnRequest.ForCss("~/Combined.css")
.Compact
.File("~/Content/Site.css")
.Configure();
}
}
}
22 changes: 0 additions & 22 deletions Demos/Mvc/MvcDemo/MvcDemo/Global.asax.cs
Expand Up @@ -24,33 +24,11 @@ public static void RegisterRoutes(RouteCollection routes)

}

public static void ConfigureRejuicer()
{
/*OnRequest.ForJs("~/Combined-{0}.js")
.Compact
.FilesIn("~/Scripts/")
.Matching("*.js")
.FilesIn("~/Scripts/")
.Matching("*.coffee")
.Configure();
OnRequest.ForCss("~/Combined.css")
.Compact
.File("~/Content/Site.css")
.Configure();
OnRequest.ForImage("~/CachedImage-{0}.png")
.Combine
.File("~/Content/transformedUrlImage.png")
.Configure();*/
}

protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();

RegisterRoutes(RouteTable.Routes);
ConfigureRejuicer();
}
}
}
20 changes: 15 additions & 5 deletions Demos/Mvc/MvcDemo/MvcDemo/MvcDemo.csproj
Expand Up @@ -35,10 +35,17 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="EcmaScript.NET.modified, Version=0.1.1.0, Culture=neutral, PublicKeyToken=7d53ba4f537753a5, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Lib\EcmaScript.NET.modified.dll</HintPath>
<HintPath>..\packages\YUICompressor.NET.1.5.0.0\lib\NET35\EcmaScript.NET.modified.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Rejuicer, Version=1.2.6.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Rejuicer.1.2.6\lib\40\Rejuicer.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Drawing" />
Expand Down Expand Up @@ -68,12 +75,15 @@
<Reference Include="System.Configuration" />
<Reference Include="System.Web.Services" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="WebActivator">
<HintPath>..\packages\WebActivator.1.5\lib\net40\WebActivator.dll</HintPath>
</Reference>
<Reference Include="Yahoo.Yui.Compressor, Version=1.5.0.0, Culture=neutral, PublicKeyToken=f8b4b81ec75097e2, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Lib\Yahoo.Yui.Compressor.dll</HintPath>
<HintPath>..\packages\YUICompressor.NET.1.5.0.0\lib\NET35\Yahoo.Yui.Compressor.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="App_Start\Rejuicer.cs" />
<Compile Include="Controllers\AccountController.cs" />
<Compile Include="Controllers\HomeController.cs" />
<Compile Include="Global.asax.cs">
Expand Down Expand Up @@ -114,7 +124,7 @@
<Folder Include="App_Data\" />
</ItemGroup>
<ItemGroup>
<None Include="Scripts\example.coffee" />
<Content Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
Expand Down
3 changes: 0 additions & 3 deletions Demos/Mvc/MvcDemo/MvcDemo/Scripts/example.coffee

This file was deleted.

6 changes: 3 additions & 3 deletions Demos/Mvc/MvcDemo/MvcDemo/Web.config
Expand Up @@ -15,9 +15,6 @@
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
</assemblies>
</compilation>
<httpModules>
<add name="Rejuicer" type="Rejuicer.RejuicerModule, Rejuicer" />
</httpModules>
<authentication mode="Forms">
<forms loginUrl="~/Account/LogOn" timeout="2880" />
</authentication>
Expand Down Expand Up @@ -49,6 +46,9 @@
<add namespace="Rejuicer" />
</namespaces>
</pages>
<httpModules>
<add name="Rejuicer" type="Rejuicer.RejuicerModule, Rejuicer" />
</httpModules>
</system.web>
<system.webServer>
<validation validateIntegratedModeConfiguration="false" />
Expand Down
7 changes: 7 additions & 0 deletions Demos/Mvc/MvcDemo/MvcDemo/packages.config
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="YUICompressor.NET" version="1.5.0.0" />
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
<package id="WebActivator" version="1.5" />
<package id="Rejuicer" version="1.2.6" />
</packages>
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,26 @@
using Rejuicer;

[assembly: WebActivator.PostApplicationStartMethod(typeof($rootnamespace$.App_Start.RejuicerContent), "Configure")]
namespace $rootnamespace$.App_Start
{
public static class RejuicerContent
{
public static void Configure()
{
/*
OnRequest.ForJs("~/Combined-{0}.js")
.Compact
.FilesIn("~/Scripts/")
.Matching("*.js")
.FilesIn("~/Scripts/") // Include coffee script, these will be automatically compiled to javascript
.Matching("*.coffee")
.Configure();
OnRequest.ForCss("~/Combined.css")
.Compact
.File("~/Content/Site.css")
.Configure();
*/
}
}
}
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<httpModules>
<add name="Rejuicer" type="Rejuicer.RejuicerModule, Rejuicer" />
</httpModules>

<pages>
<namespaces>
<add namespace="Rejuicer"/>
</namespaces>
</pages>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true">
<add name="Rejuicer" type="Rejuicer.RejuicerModule, Rejuicer"/>
</modules>
</system.webServer>
</configuration>
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions Demos/Mvc/MvcDemo/packages/repositories.config
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<repositories>
<repository path="..\MvcDemo\packages.config" />
</repositories>
23 changes: 23 additions & 0 deletions Demos/WebForms/WebFormsDemo/WebFormsDemo/App_Start/Rejuicer.cs
@@ -0,0 +1,23 @@
using Rejuicer;

[assembly: WebActivator.PostApplicationStartMethod(typeof(WebFormsDemo.App_Start.RejuicerContent), "Configure")]
namespace WebFormsDemo.App_Start
{
public static class RejuicerContent
{
public static void Configure()
{
OnRequest.ForJs("~/Combined-{0}.js")
.Compact
.FilesIn("~/Scripts/")
.Matching("*.js")
.Configure();

OnRequest.ForCss("~/Combined.css")
.Compact
.FilesIn("~/Styles/")
.Matching("*.css")
.Configure();
}
}
}
16 changes: 0 additions & 16 deletions Demos/WebForms/WebFormsDemo/WebFormsDemo/Global.asax.cs
Expand Up @@ -14,22 +14,6 @@ public class Global : System.Web.HttpApplication
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
ConfigureRejuicer();
}

public static void ConfigureRejuicer()
{
OnRequest.ForJs("~/Combined-{0}.js")
.Compact
.FilesIn("~/Scripts/")
.Matching("*.js")
.Configure();

OnRequest.ForCss("~/Combined.css")
.Compact
.FilesIn("~/Styles/")
.Matching("*.css")
.Configure();
}

void Application_End(object sender, EventArgs e)
Expand Down
35 changes: 10 additions & 25 deletions Demos/WebForms/WebFormsDemo/WebFormsDemo/Web.config
@@ -1,64 +1,49 @@
<?xml version="1.0"?>

<?xml version="1.0" encoding="utf-8"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->

<configuration>
<connectionStrings>
<add name="ApplicationServices"
connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true"
providerName="System.Data.SqlClient" />
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient" />
</connectionStrings>

<system.web>
<compilation debug="false" targetFramework="4.0" />

<httpModules>
<add name="Rejuicer" type="Rejuicer.RejuicerModule, Rejuicer" />
</httpModules>

<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880" />
</authentication>

<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices"
enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10"
applicationName="/" />
<clear />
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
</providers>
</membership>

<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
<clear />
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/" />
</providers>
</profile>

<roleManager enabled="false">
<providers>
<clear/>
<clear />
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/" />
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/" />
</providers>
</roleManager>

<pages>
<namespaces>
<add namespace="Rejuicer" />
</namespaces>
</pages>
</system.web>

<system.webServer>
<validation validateIntegratedModeConfiguration="false"/>
<validation validateIntegratedModeConfiguration="false" />
<modules runAllManagedModulesForAllRequests="true">
<add name="Rejuicer" type="Rejuicer.RejuicerModule, Rejuicer"/>
<add name="Rejuicer" type="Rejuicer.RejuicerModule, Rejuicer" />
</modules>
</system.webServer>
</configuration>
</configuration>
24 changes: 18 additions & 6 deletions Demos/WebForms/WebFormsDemo/WebFormsDemo/WebFormsDemo.csproj
Expand Up @@ -32,12 +32,17 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="EcmaScript.NET.modified">
<HintPath>..\..\..\..\Lib\EcmaScript.NET.modified.dll</HintPath>
<Reference Include="EcmaScript.NET.modified, Version=0.1.1.0, Culture=neutral, PublicKeyToken=7d53ba4f537753a5, processorArchitecture=MSIL">
<HintPath>..\packages\YUICompressor.NET.1.5.0.0\lib\NET35\EcmaScript.NET.modified.dll</HintPath>
</Reference>
<Reference Include="Microsoft.CSharp" />
<Reference Include="Rejuicer">
<HintPath>..\..\..\..\Lib\Rejuicer.dll</HintPath>
<Reference Include="Microsoft.Web.Infrastructure, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<Private>True</Private>
<HintPath>..\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll</HintPath>
</Reference>
<Reference Include="Rejuicer, Version=1.2.6.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Rejuicer.1.2.6\lib\40\Rejuicer.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
Expand All @@ -54,8 +59,11 @@
<Reference Include="System.Web.DynamicData" />
<Reference Include="System.Web.Entity" />
<Reference Include="System.Web.ApplicationServices" />
<Reference Include="Yahoo.Yui.Compressor">
<HintPath>..\..\..\..\Lib\Yahoo.Yui.Compressor.dll</HintPath>
<Reference Include="WebActivator">
<HintPath>..\packages\WebActivator.1.5\lib\net40\WebActivator.dll</HintPath>
</Reference>
<Reference Include="Yahoo.Yui.Compressor, Version=1.5.0.0, Culture=neutral, PublicKeyToken=f8b4b81ec75097e2, processorArchitecture=MSIL">
<HintPath>..\packages\YUICompressor.NET.1.5.0.0\lib\NET35\Yahoo.Yui.Compressor.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -116,6 +124,7 @@
<Compile Include="Account\Register.aspx.designer.cs">
<DependentUpon>Register.aspx</DependentUpon>
</Compile>
<Compile Include="App_Start\Rejuicer.cs" />
<Compile Include="Default.aspx.cs">
<DependentUpon>Default.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
Expand All @@ -142,6 +151,9 @@
<Content Include="Account\Web.config" />
<Content Include="Site.Master" />
</ItemGroup>
<ItemGroup>
<Content Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
<ProjectExtensions>
Expand Down
7 changes: 7 additions & 0 deletions Demos/WebForms/WebFormsDemo/WebFormsDemo/packages.config
@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Microsoft.Web.Infrastructure" version="1.0.0.0" />
<package id="Rejuicer" version="1.2.6" />
<package id="WebActivator" version="1.5" />
<package id="YUICompressor.NET" version="1.5.0.0" />
</packages>
Binary file not shown.
Binary file not shown.

0 comments on commit f76477a

Please sign in to comment.