Skip to content

Commit

Permalink
Wrapped up input modification code
Browse files Browse the repository at this point in the history
  • Loading branch information
KrisJordan committed Jan 5, 2011
1 parent f148e99 commit d7d18e8
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 5 deletions.
Empty file added .test
Empty file.
9 changes: 8 additions & 1 deletion Cakefile
Expand Up @@ -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) ->
Expand All @@ -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/*"
]
4 changes: 2 additions & 2 deletions 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>

Expand Down Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion 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>
Expand Down
2 changes: 1 addition & 1 deletion src/icing.coffee
Expand Up @@ -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
Expand Down

0 comments on commit d7d18e8

Please sign in to comment.