Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add an example of CoffeeScript usage

  • Loading branch information...
commit 351152857310981aa8c0f492441cc6f5aa251bd1 1 parent 0f5f27e
@thomasvm authored
View
26 SquishItAspNetTest/Medals.aspx
@@ -0,0 +1,26 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Medals.aspx.cs" Inherits="SquishItAspNetTest._Medals" %>
+<%@ Import Namespace="SquishIt.Framework"%>
+
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" >
+<head runat="server">
+ <title></title>
+</head>
+<body>
+ <%= Bundle.JavaScript()
+ .Add("~/js/jquery_1.4.2.js")
+ .Add("~/js/Medals.coffee")
+ .Render("~/js/combined_#.js") %>
+ <form id="form1" runat="server">
+ <div>
+ <h2>Gold and Silver</h2>
+ <ul id="goldandsilver">
+ </ul>
+ <h2>The Field</h2>
+ <ul id="others">
+ </ul>
+ </div>
+ </form>
+</body>
+</html>
View
6 SquishItAspNetTest/Medals.aspx.cs
@@ -0,0 +1,6 @@
+namespace SquishItAspNetTest
+{
+ public partial class _Medals : System.Web.UI.Page
+ {
+ }
+}
View
24 SquishItAspNetTest/Medals.aspx.designer.cs
@@ -0,0 +1,24 @@
+//------------------------------------------------------------------------------
+// <auto-generated>
+// This code was generated by a tool.
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace SquishItAspNetTest {
+
+
+ public partial class _Medals {
+
+ /// <summary>
+ /// form1 control.
+ /// </summary>
+ /// <remarks>
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ /// </remarks>
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+ }
+}
View
295 SquishItAspNetTest/SquishItAspNetTest.csproj
@@ -1,150 +1,159 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>9.0.30729</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{0AACFCB5-E2AF-45FC-BFB1-3F5126C23F45}</ProjectGuid>
- <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>SquishItAspNetTest</RootNamespace>
- <AssemblyName>SquishItAspNetTest</AssemblyName>
- <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
- <FileUpgradeFlags>
- </FileUpgradeFlags>
- <OldToolsVersion>4.0</OldToolsVersion>
- <UpgradeBackupLocation />
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Data" />
- <Reference Include="System.Core">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Data.DataSetExtensions">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Web.Extensions">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Xml.Linq">
- <RequiredTargetFramework>3.5</RequiredTargetFramework>
- </Reference>
- <Reference Include="System.Drawing" />
- <Reference Include="System.Web" />
- <Reference Include="System.Xml" />
- <Reference Include="System.Configuration" />
- <Reference Include="System.Web.Services" />
- <Reference Include="System.EnterpriseServices" />
- <Reference Include="System.Web.Mobile" />
- </ItemGroup>
- <ItemGroup>
- <Content Include="css\CodeThinked.css" />
- <Content Include="css\extra\extra.css" />
- <Content Include="css\images\ui-bg_diagonals-thick_18_b81900_40x40.png" />
- <Content Include="css\images\ui-bg_diagonals-thick_20_666666_40x40.png" />
- <Content Include="css\images\ui-bg_flat_10_000000_40x100.png" />
- <Content Include="css\images\ui-bg_glass_100_f6f6f6_1x400.png" />
- <Content Include="css\images\ui-bg_glass_100_fdf5ce_1x400.png" />
- <Content Include="css\images\ui-bg_glass_65_ffffff_1x400.png" />
- <Content Include="css\images\ui-bg_gloss-wave_35_f6a828_500x100.png" />
- <Content Include="css\images\ui-bg_highlight-soft_100_eeeeee_1x100.png" />
- <Content Include="css\images\ui-bg_highlight-soft_75_ffe45c_1x100.png" />
- <Content Include="css\images\ui-icons_222222_256x240.png" />
- <Content Include="css\images\ui-icons_228ef1_256x240.png" />
- <Content Include="css\images\ui-icons_ef8c08_256x240.png" />
- <Content Include="css\images\ui-icons_ffd27a_256x240.png" />
- <Content Include="css\images\ui-icons_ffffff_256x240.png" />
- <Content Include="css\import.css" />
- <Content Include="css\jquery-ui-1.8.5.custom.css" />
- <Content Include="css\testdotless.css" />
- <Content Include="Default.aspx" />
- <Content Include="images\calendar.png" />
- <Content Include="js\jquery-ui-1.8.5.js" />
- <Content Include="js\jquery_1.4.2.js" />
- <Content Include="js\Menu.js" />
- <Content Include="Menu.ascx" />
- <Content Include="Web.config">
- <SubType>Designer</SubType>
- </Content>
- </ItemGroup>
- <ItemGroup>
- <Compile Include="Constants.cs" />
- <Compile Include="Default.aspx.cs">
- <SubType>ASPXCodeBehind</SubType>
- <DependentUpon>Default.aspx</DependentUpon>
- </Compile>
- <Compile Include="Default.aspx.designer.cs">
- <DependentUpon>Default.aspx</DependentUpon>
- </Compile>
- <Compile Include="Menu.ascx.cs">
- <DependentUpon>Menu.ascx</DependentUpon>
- <SubType>ASPXCodeBehind</SubType>
- </Compile>
- <Compile Include="Menu.ascx.designer.cs">
- <DependentUpon>Menu.ascx</DependentUpon>
- </Compile>
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\SquishIt.Framework\SquishIt.Framework.csproj">
- <Project>{50C3BC24-E534-4B78-8E8E-CB2C4053321D}</Project>
- <Name>SquishIt.Framework</Name>
- </ProjectReference>
- </ItemGroup>
- <ItemGroup>
- <Folder Include="App_Data\" />
- </ItemGroup>
- <ItemGroup>
- <None Include="css\testdotless.css.less" />
- </ItemGroup>
- <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>9.0.30729</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{0AACFCB5-E2AF-45FC-BFB1-3F5126C23F45}</ProjectGuid>
+ <ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>SquishItAspNetTest</RootNamespace>
+ <AssemblyName>SquishItAspNetTest</AssemblyName>
+ <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+ <FileUpgradeFlags>
+ </FileUpgradeFlags>
+ <OldToolsVersion>4.0</OldToolsVersion>
+ <UpgradeBackupLocation />
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="System" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Core">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Data.DataSetExtensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Web.Extensions">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Xml.Linq">
+ <RequiredTargetFramework>3.5</RequiredTargetFramework>
+ </Reference>
+ <Reference Include="System.Drawing" />
+ <Reference Include="System.Web" />
+ <Reference Include="System.Xml" />
+ <Reference Include="System.Configuration" />
+ <Reference Include="System.Web.Services" />
+ <Reference Include="System.EnterpriseServices" />
+ <Reference Include="System.Web.Mobile" />
+ </ItemGroup>
+ <ItemGroup>
+ <Content Include="Medals.aspx" />
+ <Content Include="css\CodeThinked.css" />
+ <Content Include="css\extra\extra.css" />
+ <Content Include="css\images\ui-bg_diagonals-thick_18_b81900_40x40.png" />
+ <Content Include="css\images\ui-bg_diagonals-thick_20_666666_40x40.png" />
+ <Content Include="css\images\ui-bg_flat_10_000000_40x100.png" />
+ <Content Include="css\images\ui-bg_glass_100_f6f6f6_1x400.png" />
+ <Content Include="css\images\ui-bg_glass_100_fdf5ce_1x400.png" />
+ <Content Include="css\images\ui-bg_glass_65_ffffff_1x400.png" />
+ <Content Include="css\images\ui-bg_gloss-wave_35_f6a828_500x100.png" />
+ <Content Include="css\images\ui-bg_highlight-soft_100_eeeeee_1x100.png" />
+ <Content Include="css\images\ui-bg_highlight-soft_75_ffe45c_1x100.png" />
+ <Content Include="css\images\ui-icons_222222_256x240.png" />
+ <Content Include="css\images\ui-icons_228ef1_256x240.png" />
+ <Content Include="css\images\ui-icons_ef8c08_256x240.png" />
+ <Content Include="css\images\ui-icons_ffd27a_256x240.png" />
+ <Content Include="css\images\ui-icons_ffffff_256x240.png" />
+ <Content Include="css\import.css" />
+ <Content Include="css\jquery-ui-1.8.5.custom.css" />
+ <Content Include="css\testdotless.css" />
+ <Content Include="Default.aspx" />
+ <Content Include="images\calendar.png" />
+ <Content Include="js\jquery-ui-1.8.5.js" />
+ <Content Include="js\jquery_1.4.2.js" />
+ <Content Include="js\Menu.js" />
+ <Content Include="Menu.ascx" />
+ <Content Include="Web.config">
+ <SubType>Designer</SubType>
+ </Content>
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Constants.cs" />
+ <Compile Include="Medals.aspx.cs">
+ <DependentUpon>Medals.aspx</DependentUpon>
+ <SubType>ASPXCodeBehind</SubType>
+ </Compile>
+ <Compile Include="Medals.aspx.designer.cs">
+ <DependentUpon>Medals.aspx</DependentUpon>
+ </Compile>
+ <Compile Include="Default.aspx.cs">
+ <SubType>ASPXCodeBehind</SubType>
+ <DependentUpon>Default.aspx</DependentUpon>
+ </Compile>
+ <Compile Include="Default.aspx.designer.cs">
+ <DependentUpon>Default.aspx</DependentUpon>
+ </Compile>
+ <Compile Include="Menu.ascx.cs">
+ <DependentUpon>Menu.ascx</DependentUpon>
+ <SubType>ASPXCodeBehind</SubType>
+ </Compile>
+ <Compile Include="Menu.ascx.designer.cs">
+ <DependentUpon>Menu.ascx</DependentUpon>
+ </Compile>
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <ItemGroup>
+ <ProjectReference Include="..\SquishIt.Framework\SquishIt.Framework.csproj">
+ <Project>{50C3BC24-E534-4B78-8E8E-CB2C4053321D}</Project>
+ <Name>SquishIt.Framework</Name>
+ </ProjectReference>
+ </ItemGroup>
+ <ItemGroup>
+ <Folder Include="App_Data\" />
+ </ItemGroup>
+ <ItemGroup>
+ <None Include="css\testdotless.css.less" />
+ <None Include="js\Medals.coffee" />
+ </ItemGroup>
+ <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
- -->
- <ProjectExtensions>
- <VisualStudio>
- <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
- <WebProjectProperties>
- <UseIIS>False</UseIIS>
- <AutoAssignPort>True</AutoAssignPort>
- <DevelopmentServerPort>29379</DevelopmentServerPort>
- <DevelopmentServerVPath>/</DevelopmentServerVPath>
- <IISUrl>
- </IISUrl>
- <NTLMAuthentication>False</NTLMAuthentication>
- <UseCustomServer>False</UseCustomServer>
- <CustomServerUrl>
- </CustomServerUrl>
- <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
- </WebProjectProperties>
- </FlavorProperties>
- </VisualStudio>
- </ProjectExtensions>
- <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
+ -->
+ <ProjectExtensions>
+ <VisualStudio>
+ <FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}">
+ <WebProjectProperties>
+ <UseIIS>False</UseIIS>
+ <AutoAssignPort>True</AutoAssignPort>
+ <DevelopmentServerPort>29379</DevelopmentServerPort>
+ <DevelopmentServerVPath>/</DevelopmentServerVPath>
+ <IISUrl>
+ </IISUrl>
+ <NTLMAuthentication>False</NTLMAuthentication>
+ <UseCustomServer>False</UseCustomServer>
+ <CustomServerUrl>
+ </CustomServerUrl>
+ <SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile>
+ </WebProjectProperties>
+ </FlavorProperties>
+ </VisualStudio>
+ </ProjectExtensions>
+ <Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" />
</Project>
View
30 SquishItAspNetTest/js/Medals.coffee
@@ -0,0 +1,30 @@
+gold = silver = rest = "unknown"
+
+awardMedals = (first, second, others...) ->
+ gold = first
+ silver = second
+ rest = others
+
+contenders = [
+ "Michael Phelps"
+ "Liu Xiang"
+ "Yao Ming"
+ "Allyson Felix"
+ "Shawn Johnson"
+ "Roman Sebrle"
+ "Guo Jingjing"
+ "Tyson Gay"
+ "Asafa Powell"
+ "Usain Bolt"
+]
+
+awardMedals contenders...
+
+$ ->
+ _goldAndSilver = $ '#goldandsilver'
+ _others = $ "#others"
+
+ _goldAndSilver.append "<li>#{gold}</li><li>#{silver}</li>"
+
+ for other in rest
+ _others.append "<li>#{other}</li>"
View
24 SquishItAspNetTest/js/Medals.coffee.debug.js
@@ -0,0 +1,24 @@
+var awardMedals, contenders, gold, rest, silver;
+var __slice = Array.prototype.slice;
+gold = silver = rest = "unknown";
+awardMedals = function() {
+ var first, others, second;
+ first = arguments[0], second = arguments[1], others = 3 <= arguments.length ? __slice.call(arguments, 2) : [];
+ gold = first;
+ silver = second;
+ return rest = others;
+};
+contenders = ["Michael Phelps", "Liu Xiang", "Yao Ming", "Allyson Felix", "Shawn Johnson", "Roman Sebrle", "Guo Jingjing", "Tyson Gay", "Asafa Powell", "Usain Bolt"];
+awardMedals.apply(null, contenders);
+$(function() {
+ var other, _goldAndSilver, _i, _len, _others, _results;
+ _goldAndSilver = $('#goldandsilver');
+ _others = $("#others");
+ _goldAndSilver.append("<li>" + gold + "</li><li>" + silver + "</li>");
+ _results = [];
+ for (_i = 0, _len = rest.length; _i < _len; _i++) {
+ other = rest[_i];
+ _results.push(_others.append("<li>" + other + "</li>"));
+ }
+ return _results;
+});
Please sign in to comment.
Something went wrong with that request. Please try again.