Skip to content

Commit

Permalink
made sassandcoffee nuget dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinBeckwith committed Feb 28, 2012
1 parent 5a113ef commit e8ced7b
Show file tree
Hide file tree
Showing 103 changed files with 6,510 additions and 262 deletions.
2 changes: 1 addition & 1 deletion Demo/BadSyntax.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* !!! AUTOMATICALLY GENERATED CODE !!!
* -------------------------------------------------------------------------
* This file was automatically generated by the OrangeBits compiler.
* Compiled on: 2/9/2012 6:00:04 PM
* Compiled on: 2/27/2012 10:32:21 PM
* Compiled by: REDMOND\justbe
* Source: C:\Users\justbe\Dropbox\Code\OrangeBits\Demo\BadSyntax.less
* -------------------------------------------------------------------------*/
Expand Down
1 change: 1 addition & 0 deletions Demo/BadSyntax.sass
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
this is bad syntax!
3 changes: 3 additions & 0 deletions Demo/BadSyntax.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
this
is
bad syntax
2 changes: 1 addition & 1 deletion Demo/lessTest.css
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* !!! AUTOMATICALLY GENERATED CODE !!!
* -------------------------------------------------------------------------
* This file was automatically generated by the OrangeBits compiler.
* Compiled on: 2/9/2012 5:57:51 PM
* Compiled on: 2/27/2012 10:55:25 PM
* Compiled by: REDMOND\justbe
* Source: C:\Users\justbe\Dropbox\Code\OrangeBits\Demo\lessTest.less
* -------------------------------------------------------------------------*/
Expand Down
2 changes: 1 addition & 1 deletion Demo/lessTest.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
color: darken(@purple, 12%);
padding: @margin / 2;
margin: @margin / 2;
}
}
11 changes: 11 additions & 0 deletions Demo/sassTest.css
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@

/* -------------------------------------------------------------------------
* !!! AUTOMATICALLY GENERATED CODE !!!
* -------------------------------------------------------------------------
* This file was automatically generated by the OrangeBits compiler.
* Compiled on: 2/27/2012 10:31:01 PM
* Compiled by: REDMOND\justbe
* Source: C:\Users\justbe\Dropbox\Code\OrangeBits\Demo\sassTest.sass
* -------------------------------------------------------------------------*/


.sassBox {
background-color: #caeef2;
border-color: #3bbfce;
Expand Down
9 changes: 9 additions & 0 deletions Demo/stylusTest.styl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
body a
font 12px/1.3 "Lucida Grande", Arial, sans-serif
background black
color #ccc

form input
padding 5px
border 1px solid

Binary file modified OrangeBits.sln.docstates.suo
Binary file not shown.
Binary file modified OrangeBits.suo
Binary file not shown.
Binary file added OrangeBits.v11.suo
Binary file not shown.
12 changes: 6 additions & 6 deletions OrangeBits/Compilers/CoffeeCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
using System.Linq;
using System.Text;
using System.IO;
using SassAndCoffee.Core;
using SassAndCoffee.Core.CoffeeScript;
using SassAndCoffee.Core.Pipeline;
using SassAndCoffee.Core.Pooling;
using OrangeBits;

using SassAndCoffee.Core;
using SassAndCoffee.JavaScript;
using SassAndCoffee.JavaScript.CoffeeScript;

namespace OrangeBits.Compilers
{
public class CoffeeCompiler : ICompiler
{
public void Compile(string inPath, string outPath)
{
SassAndCoffee.Core.CoffeeScript.CoffeeScriptCompiler compiler = new CoffeeScriptCompiler(new InstanceProvider<IJavaScriptRuntime>(() => new IEJavaScriptRuntime()));
{
CoffeeScriptCompiler compiler = new CoffeeScriptCompiler(new SassAndCoffee.Core.InstanceProvider<IJavaScriptRuntime>(() => new IEJavaScriptRuntime()));
using (StreamReader sr = new StreamReader(inPath))
{
string content = sr.ReadToEnd();
Expand Down
42 changes: 27 additions & 15 deletions OrangeBits/Compilers/LessCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,43 @@
using System.Security.Principal;

using dotless.Core;
using dotless.Core.Parser.Tree;
using dotless.Core.Parser.Infrastructure;
using dotless.Core.Exceptions;


namespace OrangeBits.Compilers
{
/// <summary>
///
/// </summary>
public class LessCompiler : ICompiler
{
public class LessCompiler : ICompiler
{
/// <summary>
///
/// </summary>
/// <param name="inPath"></param>
/// <param name="outPath"></param>
public void Compile(string inPath, string outPath)
{
using (StreamReader sr = new StreamReader(inPath))
{
string content = sr.ReadToEnd();
string output = Less.Parse(content);
using (StreamWriter sw = new StreamWriter(outPath))
{
public void Compile(string inPath, string outPath)
{
using (StreamReader sr = new StreamReader(inPath))
{
string content = sr.ReadToEnd();
LessEngine engine = new LessEngine();
Ruleset ruleset = engine.Parser.Parse(content, inPath);
Env env = new Env();
env.Compress = engine.Compress;
Env env2 = env;
string output = ruleset.ToCSS(env2);

using (StreamWriter sw = new StreamWriter(outPath))
{
sw.WriteLine(OrangeBits.GetHeader(inPath));
sw.Write(output);
}
}
}
}
sw.Write(output);
}
}
}
}
}


6 changes: 3 additions & 3 deletions OrangeBits/Compilers/SassCompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
using System.IO;
using System.Security.Principal;

using SassAndCoffee.Core.Sass;
using SassAndCoffee.Core;

namespace OrangeBits.Compilers
{
public class SassCompiler : ICompiler
{
public void Compile(string inPath, string outPath)
{
SassAndCoffee.Core.Sass.SassCompiler compiler = new SassAndCoffee.Core.Sass.SassCompiler();
string output = compiler.Compile(inPath);
SassAndCoffee.Ruby.Sass.SassCompiler compiler = new SassAndCoffee.Ruby.Sass.SassCompiler();
string output = compiler.Compile(inPath, false, null);
using (StreamWriter sw = new StreamWriter(outPath))
{
sw.WriteLine(OrangeBits.GetHeader(inPath));
Expand Down
13 changes: 11 additions & 2 deletions OrangeBits/OrangeBits.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,18 @@
</Reference>
<Reference Include="PresentationCore" />
<Reference Include="PresentationFramework" />
<Reference Include="SassAndCoffee.Core, Version=1.1.5.0, Culture=neutral, processorArchitecture=MSIL">
<Reference Include="SassAndCoffee.AspNet">
<HintPath>..\packages\SassAndCoffee.AspNet.2.0.2.0\lib\net40\SassAndCoffee.AspNet.dll</HintPath>
</Reference>
<Reference Include="SassAndCoffee.Core, Version=2.0.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Code\SassAndCoffee\SassAndCoffee.Core\bin\Debug\SassAndCoffee.Core.dll</HintPath>
<HintPath>..\packages\SassAndCoffee.Core.2.0.2.0\lib\net40-Client\SassAndCoffee.Core.dll</HintPath>
</Reference>
<Reference Include="SassAndCoffee.JavaScript">
<HintPath>..\packages\SassAndCoffee.JavaScript.2.0.2.0\lib\net40-Client\SassAndCoffee.JavaScript.dll</HintPath>
</Reference>
<Reference Include="SassAndCoffee.Ruby">
<HintPath>..\packages\SassAndCoffee.Ruby.2.0.2.0\lib\net40-Client\SassAndCoffee.Ruby.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.ComponentModel.Composition" />
Expand Down
Loading

0 comments on commit e8ced7b

Please sign in to comment.