Skip to content

Commit

Permalink
Added doc for directory-tasks.
Browse files Browse the repository at this point in the history
  • Loading branch information
mde committed Jul 16, 2011
1 parent 493b701 commit e993d74
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions README.md
Expand Up @@ -55,7 +55,7 @@ A Jakefile is just executable JavaScript. You can include whatever JavaScript yo

j## Tasks

Use `task` or `file` to define tasks. Call it with two arguments (and one optional argument):
Use `task` to define tasks. Call it with two arguments (and one optional argument):

task(name/prerequisites, action, [async]);

Expand Down Expand Up @@ -89,15 +89,24 @@ And here's an example of an asynchronous task:

### File-tasks

File-tasks create a file from one or more other files. With a file-task, Jake checks both that the file exists, and also that it is not older than the files specified by any prerequisite tasks. File-tasks are particularly useful for compiling something from a tree of source files.

Create a file task by calling `file`.

File-tasks create a file from one or more other files. With a file-task, Jake checks both that the file exists, and also that it is not older than the files specified by any prerequisite tasks. File-tasks are particularly useful for compiling something from a tree of source files.

desc('This builds a minified JS file for production.');
file({'foo-minified.js': ['foo-bar.js', 'foo-baz.js']}, function () {
file({'foo-minified.js': ['bar', 'foo-bar.js', 'foo-baz.js']}, function () {
// Code to concat and minify goes here
});

### Directory-tasks

Create a file task by calling `directory`.

Directory-tasks create a directory for use with for file-tasks. Jake checks for the existence of the directory, and only creates it if needed.

desc('This creates the bar directory for use with the foo-minified.js file-task.');
directory('bar');

### Namespaces

Use `namespace` to create a namespace of tasks to perform. Call it with two arguments:
Expand Down

0 comments on commit e993d74

Please sign in to comment.