Permalink
Browse files

some bugfixes and updates to README

  • Loading branch information...
bakkdoor committed Apr 27, 2012
1 parent ff7d199 commit 24ef89604ce5a8d357b3a77bb72bb097ff813545
Showing with 30 additions and 3 deletions.
  1. +1 −1 Fakefile
  2. +25 −0 README.md
  3. +3 −1 lib/fake/cli.fy
  4. +1 −1 lib/fake/task.fy
View
@@ -12,4 +12,4 @@ Fake tasks: {
sh: ("rm", "-rf", Directory list: "**/*.fyc") verbose: true
}
}
-}
+}
View
@@ -38,6 +38,31 @@ To see a list of general options use the help command:
$ fake --help
```
+## Specifying dependencies
+
+You can specify dependencies via the `depends` option, like so:
+
+```fancy
+Fake tasks: {
+ task_a: {
+ desc: "This task shall be run before task_b"
+ run: {
+ "Running task a" println
+ }
+ }
+
+ task_b: {
+ desc: "This tasks depends on task_a"
+ depends: 'task_a # pass an array of task names if you depend on more than one task
+ run: {
+ "Running task b" println
+ }
+ }
+}
+```
+
+When no task is specified the `default` task will be run (as with Rake).
+
## Note:
This is still in the making. More features coming soon, but defining
View
@@ -37,7 +37,9 @@ class Fake CLI {
Fake read_fakefile
@tasks each: |t| {
- Fake tasks[t to_sym] . run
+ if: (Fake tasks[t to_sym]) then: @{ run } else: {
+ System abort: "Task '#{t}' not defined. Aborting."
+ }
}
}
View
@@ -10,7 +10,7 @@ class Fake {
}
def run {
- @dependencies map: |d| { Fake tasks[d to_sym] } . each: @{ run }
+ @dependencies to_a map: |d| { Fake tasks[d to_sym] } . each: @{ run }
unless: ran? do: {
@block call_with_receiver: self

0 comments on commit 24ef896

Please sign in to comment.