Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

leaner cake

  • Loading branch information...
commit 3ab5b63fe5140b1905fe9ec99cd81a596dcbe523 1 parent 36c7969
@dmotz authored
Showing with 12 additions and 15 deletions.
  1. +11 −14 Cakefile
  2. +1 −1  docs/oridomi.html
View
25 Cakefile
@@ -1,24 +1,21 @@
{exec, spawn} = require 'child_process'
-output = (data) ->
- console.log data.toString()
+output = (data) -> console.log data.toString()
-
-task 'build', 'Build, minify, and generate docs for oriDomi', ->
- exec 'coffee -c oridomi.coffee', (err, stdout, stderr) ->
+print = (fn) ->
+ (err, stdout, stderr) ->
throw err if err
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) ->
- throw err if err
- console.log stdout, stderr
+task 'build', 'Build, minify, and generate docs for oriDomi', ->
+ exec 'coffee -c oridomi.coffee', print ->
+ exec 'uglifyjs -o oridomi.min.js oridomi.js', print()
+ exec 'docco oridomi.coffee', print()
task 'watch', 'Build oriDomi continuously', ->
- coffee = spawn 'coffee', ['-wc', 'oridomi.coffee']
- coffee.stdout.on 'data', output
- coffee.stderr.on 'data', output
+ watcher = spawn 'coffee', ['-wc', 'oridomi.coffee']
+ watcher.stdout.on 'data', output
+ watcher.stderr.on 'data', output
View
2  docs/oridomi.html
@@ -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>
Please sign in to comment.
Something went wrong with that request. Please try again.