Skip to content

Commit

Permalink
leaner cake
Browse files Browse the repository at this point in the history
  • Loading branch information
dmotz committed Dec 26, 2012
1 parent 36c7969 commit 3ab5b63
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 15 deletions.
25 changes: 11 additions & 14 deletions Cakefile
Original file line number Original file line Diff line number Diff line change
@@ -1,24 +1,21 @@
{exec, spawn} = require 'child_process' {exec, spawn} = require 'child_process'


output = (data) -> output = (data) -> console.log data.toString()
console.log data.toString()



print = (fn) ->
task 'build', 'Build, minify, and generate docs for oriDomi', -> (err, stdout, stderr) ->
exec 'coffee -c oridomi.coffee', (err, stdout, stderr) ->
throw err if err throw err if err
console.log stdout, stderr console.log stdout, stderr
fn?()


exec 'uglifyjs -o oridomi.min.js oriDomi.js', (err, stdout, stderr) ->
throw err if err
console.log stdout, stderr


exec 'docco oridomi.coffee', (err, stdout, stderr) -> task 'build', 'Build, minify, and generate docs for oriDomi', ->
throw err if err exec 'coffee -c oridomi.coffee', print ->
console.log stdout, stderr exec 'uglifyjs -o oridomi.min.js oridomi.js', print()
exec 'docco oridomi.coffee', print()




task 'watch', 'Build oriDomi continuously', -> task 'watch', 'Build oriDomi continuously', ->
coffee = spawn 'coffee', ['-wc', 'oridomi.coffee'] watcher = spawn 'coffee', ['-wc', 'oridomi.coffee']
coffee.stdout.on 'data', output watcher.stdout.on 'data', output
coffee.stderr.on 'data', output watcher.stderr.on 'data', output
2 changes: 1 addition & 1 deletion docs/oridomi.html
Original file line number Original file line Diff line number Diff line change
@@ -1,4 +1,4 @@
<!DOCTYPE html> <html> <head> <title>oriDomi.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> oriDomi.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> <h1><a href="http://oridomi.com">oriDomi</a></h1> <!DOCTYPE html> <html> <head> <title>oridomi.coffee</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <link rel="stylesheet" media="all" href="docco.css" /> </head> <body> <div id="container"> <div id="background"></div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> oridomi.coffee </h1> </th> <th class="code"> </th> </tr> </thead> <tbody> <tr id="section-1"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-1">&#182;</a> </div> <h1><a href="http://oridomi.com">oriDomi</a></h1>


<h4>by <a href="http://oxism.com">Dan Motzenbecker</a></h4> <h4>by <a href="http://oxism.com">Dan Motzenbecker</a></h4>


Expand Down

0 comments on commit 3ab5b63

Please sign in to comment.