forked from mauricemach/coffeekup
-
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
1 parent
5399b60
commit 09ecf4f
Showing
22 changed files
with
240 additions
and
207 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 |
---|---|---|
@@ -1,15 +1,9 @@ | ||
exec = require('child_process').exec | ||
benchmark = require './benchmark' | ||
test = require './test' | ||
|
||
task 'build', -> | ||
exec 'coffee -c lib/coffeekup.coffee', (err) -> | ||
puts err if err | ||
exec 'cp lib/coffeekup.js examples/browser', (err) -> | ||
puts err if err | ||
|
||
task 'test', -> | ||
test.run() | ||
task 'test', -> require('./test').run() | ||
|
||
task 'benchmark', -> | ||
benchmark.run() | ||
task 'benchmark', -> require('./benchmark').run() |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
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 @@ | ||
../../../lib/coffeekup.js |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 @@ | ||
exec = require('child_process').exec | ||
fs = require 'fs' | ||
coffekup = require 'coffeekup' | ||
|
||
task 'build', -> | ||
fs.readFile 'template.coffee', 'utf-8', (err, data) -> | ||
puts err if err | ||
compiled = coffekup.compile data | ||
str = String(compiled).replace 'function anonymous', 'function template' | ||
fs.writeFile 'template.js', str, (err) -> | ||
puts err if err |
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,22 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Client-side CoffeeKup (decaf)</title> | ||
|
||
<!-- jQuery is NOT required, used here for convenience --> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | ||
|
||
<script src="template.js"></script> | ||
|
||
<script> | ||
$().ready(function(){ | ||
$('body').append(template({context: {stooges: ['moe', 'larry', 'curly']}})); | ||
}); | ||
</script> | ||
</head> | ||
<body> | ||
<h1>Client-side CoffeeKup (decaf)</h1> | ||
<p>Consuming a template from a non-CoffeeScript app.</p> | ||
</body> | ||
</html> |
2 changes: 0 additions & 2 deletions
2
examples/browser/decaf.coffee → examples/browser/decaf/template.coffee
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
h2 'Decaf' | ||
|
||
ul -> | ||
for guy in @stooges | ||
li guy |
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
exec = require('child_process').exec | ||
fs = require 'fs' | ||
coffekup = require 'coffeekup' | ||
|
||
task 'build', -> | ||
fs.readFile 'template.coffee', 'utf-8', (err, data) -> | ||
puts err if err | ||
compiled = coffekup.compile data | ||
str = String(compiled).replace 'function anonymous', 'function template' | ||
fs.writeFile 'template.js', str, (err) -> | ||
puts err if err | ||
exec 'coffee -c index.coffee', (err) -> | ||
puts err if err |
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,2 @@ | ||
$().ready -> | ||
$('body').append template(context: {stooges: ['moe', 'larry', 'curly']}) |
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,17 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Client-side CoffeeKup (regular)</title> | ||
|
||
<!-- jQuery is NOT required, used here for convenience --> | ||
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | ||
|
||
<script src="template.js"></script> | ||
<script src="index.js"></script> | ||
</head> | ||
<body> | ||
<h1>Client-side CoffeeKup (regular)</h1> | ||
<p>Writing your app and templates in CoffeeScript but pre-compiling everything on the server-side.</p> | ||
</body> | ||
</html> |
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,9 @@ | ||
(function() { | ||
$().ready(function() { | ||
return $('body').append(template({ | ||
context: { | ||
stooges: ['moe', 'larry', 'curly'] | ||
} | ||
})); | ||
}); | ||
}).call(this); |
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,3 @@ | ||
ul -> | ||
for guy in @stooges | ||
li guy |
Oops, something went wrong.