summaryrefslogtreecommitdiff
path: root/doc/guide.md
diff options
context:
space:
mode:
authorTristan Sloughter <t@crashfast.com>2014-11-08 11:55:05 -0600
committerTristan Sloughter <t@crashfast.com>2014-11-08 11:55:05 -0600
commit5fd4996803b2c9966b00be5a50db3b3510304658 (patch)
tree9c23c3d39e3f0bba305003f6b67a8c4be30ff83c /doc/guide.md
parentbcb36896543e02682c6fb36409412bcad31b7e94 (diff)
update guide
Diffstat (limited to 'doc/guide.md')
-rw-r--r--doc/guide.md35
1 files changed, 34 insertions, 1 deletions
diff --git a/doc/guide.md b/doc/guide.md
index 92df2eb..1191499 100644
--- a/doc/guide.md
+++ b/doc/guide.md
@@ -57,7 +57,23 @@ Dependencies are listed in `rebar.config` file under the `deps` key:
]}.
```
-Then you'll most likely want to add the dependency to one of your project's application's `.app.src` file under applications.
+Now you can add the dep to one of your project's application's `.app.src` file under applications:
+
+```erlang
+{application, <APPNAME>,
+ [{description, ""},
+ {vsn, "<APPVSN>"},
+ {registered, []},
+ {modules, []},
+ {applications, [
+ kernel
+ ,stdlib
+ ,cowboy
+ ]},
+ {mod, {<APPNAME>_app, []}},
+ {env, []}
+ ]}.
+```
## Rebar3 Conventions
@@ -74,6 +90,23 @@ Rebar3 is entirely based on building OTP applications and releases.
## Checkout Dependencies
+Often while developing you find yourself working on mulitple applications from separate repos together. To simplify this process `rebar3` will look in the directory `_checkouts` for applications to override a dependency.
+
+For example, you are working on project `app1` which depends on `app2`. You want to have your modifications to `app2` used by `app1`:
+
+```shell
+[app1] $ pwd
+/home/user/code/app1
+[app1] $ cat rebar.config
+{deps, [
+ {app2, "", {git, "git://github.com:user/app2.git", {branch, "master"}}}
+]}.
+[app1] $ ls -l _checkouts
+lrwxrwxrwx app2 -> /home/user/code/app2
+```
+
+Since a symlink to `app2` exists in `_checkouts` there will not be a fetch of `app2` by `rebar3` when the project is built.
+
## Tests
Rebar3 has the concept of test dependencies. These dependencies will only be fetched when a rebar3 command that runs tests is run by the user.