forked from JustinBeckwith/OrangeBits
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0f61f35
Showing
126 changed files
with
6,860 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<!DOCTYPE html> | ||
|
||
<html lang="en"> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Testing out my orange bits extension</title> | ||
<link rel="stylesheet" type="text/css" href="lessTest.css" /> | ||
<link rel="stylesheet" type="text/css" href="sassTest.css" /> | ||
<link rel="stylesheet" type="text/css" href="scssTest.css" /> | ||
</head> | ||
<body> | ||
<div class="lessBox">Here is a box styled using less</div> | ||
<div class="sassBox">Here is a box styled using sass</div> | ||
<div class="scssBox">Here is a box styled using scss</div> | ||
<div class="coffeeBox">You can't explain this</div> | ||
<script type="text/javascript" src="coffeeScriptTest.js"></script> | ||
</body> | ||
</html> |
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Assignment: | ||
number = 42 | ||
opposite = true | ||
|
||
# Conditions: | ||
number = -42 if opposite | ||
|
||
# Functions: | ||
square = (x) -> x * x | ||
|
||
# Arrays: | ||
list = [1, 2, 3, 4, 5] | ||
|
||
# Objects: | ||
math = | ||
root: Math.sqrt | ||
square: square | ||
cube: (x) -> x * square x | ||
|
||
# Splats: | ||
race = (winner, runners...) -> | ||
print winner, runners | ||
|
||
# Existence: | ||
alert "I knew it!" if elvis? | ||
|
||
# Array comprehensions: | ||
cubes = (math.cube num for num in list) | ||
|
||
|
||
# show off some coffee in the browser test | ||
setTimeout(() -> | ||
document.getElementsByClassName('coffeeBox')[0].innerHTML = 'hello from the world of coffeeScript!!!' | ||
, 1500); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
@green: #00FF00; | ||
@margin: 16px; | ||
|
||
@purple: #7D26CD; | ||
|
||
.lessBox { | ||
background-color: lighten(@green, 45%); | ||
border-color: @green; | ||
color: darken(@green, 9%); | ||
padding: @margin / 2; | ||
margin: @margin / 2; | ||
} | ||
|
||
.coffeeBox { | ||
background-color: lighten(@purple, 35%); | ||
border-color: @purple; | ||
color: darken(@purple, 12%); | ||
padding: @margin / 2; | ||
margin: @margin / 2; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
|
||
# This file can be used to affect how search engines and other web site crawlers see your site. | ||
# For more information, please see http://www.w3.org/TR/html4/appendix/notes.html#h-B.4.1.1 | ||
# WebMatrix 2.0 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.sassBox { | ||
background-color: #caeef2; | ||
border-color: #3bbfce; | ||
color: #2ca2af; | ||
padding: 8px; | ||
margin: 8px; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
$blue: #3bbfce | ||
$margin: 16px | ||
|
||
.sassBox | ||
background-color: lighten($blue, 35%) | ||
border-color: $blue | ||
color: darken($blue, 9%) | ||
padding: $margin / 2 | ||
margin: $margin / 2 | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
$red: #FF0000; | ||
$margin: 16px; | ||
|
||
.scssBox { | ||
background-color: lighten($red, 45%); | ||
border-color: $red; | ||
color: darken($red, 9%); | ||
padding: $margin / 2; | ||
margin: $margin / 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<TestSettings name="Local" id="8a8bbe6e-a5e9-4f47-8ba5-02fa60cdc921" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010"> | ||
<Description>These are default test settings for a local test run.</Description> | ||
<Deployment enabled="false" /> | ||
<Execution> | ||
<TestTypeSpecific /> | ||
<AgentRule name="Execution Agents"> | ||
</AgentRule> | ||
</Execution> | ||
</TestSettings> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 11.00 | ||
# Visual Studio 2010 | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OrangeBits", "OrangeBits\OrangeBits.csproj", "{A93FE0DC-E26F-4145-B3E3-283DF9B2FE77}" | ||
EndProject | ||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{4C102372-8D0A-47B4-BDB8-AC9E1EC9550A}" | ||
EndProject | ||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{119BE45C-0AB9-444C-939C-AF68E22E1895}" | ||
ProjectSection(SolutionItems) = preProject | ||
Local.testsettings = Local.testsettings | ||
OrangeBits.vsmdi = OrangeBits.vsmdi | ||
TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings | ||
EndProjectSection | ||
EndProject | ||
Global | ||
GlobalSection(TestCaseManagementSettings) = postSolution | ||
CategoryFile = OrangeBits.vsmdi | ||
EndGlobalSection | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|Any CPU = Debug|Any CPU | ||
Release|Any CPU = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{A93FE0DC-E26F-4145-B3E3-283DF9B2FE77}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{A93FE0DC-E26F-4145-B3E3-283DF9B2FE77}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{A93FE0DC-E26F-4145-B3E3-283DF9B2FE77}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{A93FE0DC-E26F-4145-B3E3-283DF9B2FE77}.Release|Any CPU.Build.0 = Release|Any CPU | ||
{4C102372-8D0A-47B4-BDB8-AC9E1EC9550A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
{4C102372-8D0A-47B4-BDB8-AC9E1EC9550A}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
{4C102372-8D0A-47B4-BDB8-AC9E1EC9550A}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
{4C102372-8D0A-47B4-BDB8-AC9E1EC9550A}.Release|Any CPU.Build.0 = Release|Any CPU | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
EndGlobal |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<TestLists xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010"> | ||
<TestList name="Lists of Tests" id="8c43106b-9dc1-4907-a29f-aa66a61bf5b6"> | ||
<RunConfiguration id="8a8bbe6e-a5e9-4f47-8ba5-02fa60cdc921" name="Local" storage="local.testsettings" type="Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration, Microsoft.VisualStudio.QualityTools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> | ||
</TestList> | ||
</TestLists> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace OrangeBits.Compilers | ||
{ | ||
public class BaseCompiler | ||
{ | ||
|
||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.IO; | ||
using SassAndCoffee.Core; | ||
using SassAndCoffee.Core.CoffeeScript; | ||
using SassAndCoffee.Core.Pipeline; | ||
using SassAndCoffee.Core.Pooling; | ||
|
||
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())); | ||
using (StreamReader sr = new StreamReader(inPath)) | ||
{ | ||
string content = sr.ReadToEnd(); | ||
string output = compiler.Compile(content); | ||
using (StreamWriter sw = new StreamWriter(outPath)) | ||
{ | ||
sw.Write(output); | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace OrangeBits.Compilers | ||
{ | ||
/// <summary> | ||
/// basic structure to store results of a compilation | ||
/// </summary> | ||
public class CompileResults | ||
{ | ||
/// <summary> | ||
/// notes the compilation was successful | ||
/// </summary> | ||
public bool Success { get; set; } | ||
|
||
/// <summary> | ||
/// notes if the new file was created for the first time | ||
/// </summary> | ||
public bool IsNewFile { get; set; } | ||
|
||
/// <summary> | ||
/// original source input file path | ||
/// </summary> | ||
public string InputPath { get; set; } | ||
|
||
/// <summary> | ||
/// new compiled output file path | ||
/// </summary> | ||
public string OutputPath { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace OrangeBits.Compilers | ||
{ | ||
interface ICompiler | ||
{ | ||
void Compile(string inPath, string outPath); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading; | ||
using System.ComponentModel; | ||
using System.Collections.Specialized; | ||
using System.IO; | ||
|
||
using dotless.Core; | ||
|
||
namespace OrangeBits.Compilers | ||
{ | ||
/// <summary> | ||
/// | ||
/// </summary> | ||
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)) | ||
{ | ||
sw.Write(output); | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.