Skip to content

Commit

Permalink
Describe Lakefile modularity on README.
Browse files Browse the repository at this point in the history
  • Loading branch information
takagi committed Sep 20, 2015
1 parent 0a0c04f commit 6b028c1
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,33 @@ Lake provides the following forms to define tasks and namespaces in `Lakefile`:
$ lake foo:bar:baz
foo.bar.baz

### Lakefile Modularity

Lakefile modularity is quite easy without any special facilities, just `load` a Lakefile from another is enough. Tasks with same name are replaced with newer loaded as ones in a Lakefile. Namespaces with same name are merged into.

Lakefile

(load "Lakefile.sub")

(namespace "name"
(task "foo"
(echo "name.foo")))

Lakefile.sub

(namespace "name"
(task "bar"
(echo "name.bar")))

So you can execute the two tasks respectively as following.

$ ls
Lakefile Lakefile.sub
$ lake name:foo
name.foo
$ lake name:bar
name.bar

## API

### [Function] lake
Expand Down

0 comments on commit 6b028c1

Please sign in to comment.