Skip to content
Browse files

Wrapped up input modification code

  • Loading branch information...
1 parent f148e99 commit d7d18e8ab1215b63b113f38a137918f7b81c9a96 @KrisJordan committed Jan 5, 2011
Showing with 12 additions and 5 deletions.
  1. 0 .test
  2. +8 −1 Cakefile
  3. +2 −2 docs/icing.html
  4. +1 −1 docs/rules.html
  5. +1 −1 src/icing.coffee
View
0 .test
No changes.
View
9 Cakefile
@@ -9,7 +9,9 @@ task 'test', ['spec/*'], (options) ->
if options.spec?
args.push '--spec'
command = "vows #{args.join ' '} #{this.prereqs.join(' ')}"
- this.exec command
+ this.exec [
+ command
+ ]
task 'docs', 'Generate docco documentation', ['src/*'],
exec: (options) ->
@@ -21,3 +23,8 @@ task 'docs', 'Generate docco documentation', ['src/*'],
prereq.replace /src\/(.*).coffee/,"docs/$1.html"
task 'all', 'Test and Document', ['test','docs'], (options) -> this.finished()
+
+task 'clean', 'Remove Generated Files', [], ->
+ this.exec [
+ "rm -rf docs/*"
+ ]
View
4 docs/icing.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <html> <head> <title>icing.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> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="icing.html"> icing.coffee </a> <a class="source" href="rules.html"> rules.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> icing.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> <p><strong>icing</strong> adds dependency management to Cakefiles by extending and
+<!DOCTYPE html> <html> <head> <title>icing.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> icing.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> <p><strong>icing</strong> adds dependency management to Cakefiles by extending and
slightly modifying cake's "task" function. Add icing to your Cakefiles by adding
a single line:</p>
@@ -97,7 +97,7 @@
<span class="nv">tasksLeft = </span><span class="nx">recipeNodes</span><span class="p">.</span><span class="nx">pluck</span><span class="p">(</span><span class="s1">&#39;name&#39;</span><span class="p">).</span><span class="nx">join</span><span class="p">(</span><span class="s1">&#39;,&#39;</span><span class="p">)</span>
<span class="nx">console</span><span class="p">.</span><span class="nx">error</span> <span class="s2">&quot;\nError: task `#{recipeNode.name}` did not complete.\n&quot;</span> <span class="o">+</span>
<span class="s2">&quot;Tasks [#{tasksLeft}] should have run, but did not.\n&quot;</span> <span class="o">+</span>
- <span class="s2">&quot;Task `#{recipeNode.name}` should call this.finished() or this.failed(message).\n&quot;</span></pre></div> </td> </tr> <tr id="section-10"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-10">&#182;</a> </div> <h3>Helpers</h3> </td> <td class="code"> <div class="highlight"><pre></pre></div> </td> </tr> <tr id="section-11"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-11">&#182;</a> </div> <p>Set-up the context that a recipe exec is run in.</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">runRecipeContext = </span><span class="nf">(graph, recipeNode, runNextRecipeCallback, options) -&gt;</span>
+ <span class="s2">&quot;Task `#{recipeNode.name}` should call this.finished() or this.failed(message).\n&quot;</span></pre></div> </td> </tr> <tr id="section-10"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-10">&#182;</a> </div> <h3>Helpers</h3> </td> <td class="code"> <div class="highlight"><pre></pre></div> </td> </tr> <tr id="section-11"> <td class="docs"> <div class="pilwrap"> <a class="pilcrow" href="#section-11">&#182;</a> </div> <p>Set-up the context that a recipe exec is run in</p> </td> <td class="code"> <div class="highlight"><pre><span class="nv">runRecipeContext = </span><span class="nf">(graph, recipeNode, runNextRecipeCallback, options) -&gt;</span>
<span class="nv">finishedFn = </span><span class="o">-&gt;</span> <span class="nx">do</span> <span class="nx">runNextRecipeCallback</span>
View
2 docs/rules.html
@@ -1,4 +1,4 @@
-<!DOCTYPE html> <html> <head> <title>rules.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> rules.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> <p><strong>rules</strong> models task pipelines using directed acyclic graph (<strong>dag.coffee</strong>) primitives.
+<!DOCTYPE html> <html> <head> <title>rules.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> <div id="jump_to"> Jump To &hellip; <div id="jump_wrapper"> <div id="jump_page"> <a class="source" href="dag.html"> dag.coffee </a> <a class="source" href="icing.html"> icing.coffee </a> <a class="source" href="rules.html"> rules.coffee </a> </div> </div> </div> <table cellpadding="0" cellspacing="0"> <thead> <tr> <th class="docs"> <h1> rules.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> <p><strong>rules</strong> models task pipelines using directed acyclic graph (<strong>dag.coffee</strong>) primitives.
Following in the heritage of <em>make</em>, rules have a target, prerequisites, and a recipe.
Unlike <em>make</em> target is a symbolic name and prerequisites can refer to other rules or to
files on disk.</p>
View
2 src/icing.coffee
@@ -115,7 +115,7 @@ global.task = (target, description, prereqs=undefined, recipe=undefined) ->
#### Helpers
-# Set-up the context that a recipe exec is run in.
+# Set-up the context that a recipe exec is run in
runRecipeContext = (graph, recipeNode, runNextRecipeCallback, options) ->
finishedFn = -> do runNextRecipeCallback

0 comments on commit d7d18e8

Please sign in to comment.
Something went wrong with that request. Please try again.