Skip to content

Commit 439f15f

Browse files
Review whole doc. and improve it where warranted
1 parent 3ebc485 commit 439f15f

32 files changed

+542
-584
lines changed

Diff for: README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Netlify Status](https://api.netlify.com/api/v1/badges/7f9a24ea-990d-40de-88c5-a4c64d90c155/deploy-status)](https://app.netlify.com/sites/rebar3/deploys)
44

5-
[Hugo](https://gohugo.io/) site for [rebar3](rebar3.org) documentation.
5+
[Hugo](https://gohugo.io/) site for [Rebar3](rebar3.org) documentation.
66

77
### Initial Setup
88

Diff for: content/en/_index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@
4747
{{% /blocks/feature %}}
4848

4949
{{% blocks/feature icon="fab fa-github" title="Contributions welcome!" url="https://github.com/erlang/rebar3" %}}
50-
We do a [Pull Request](https://github.com/erlang/rebar3/pulls) contributions workflow on **GitHub**.
50+
We do a [Pull Request](https://github.com/erlang/rebar3/pulls) contributions workflow on **GitHub**.
5151

52-
New users are always welcome!
52+
New users are always welcome!
5353
{{% /blocks/feature %}}
5454

5555
{{% blocks/feature icon="fab fa-chat" title="Join us on IRC" url="" %}}

Diff for: content/en/docs/_index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ menu:
66
main:
77
weight: 10
88
description: >
9-
Documentation and usage guides on how to use Rebar3.
9+
Documentation and usage guides for Rebar3.
1010
---
1111

Diff for: content/en/docs/about/about-us.md

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ excerpt: ""
66

77
- [Issue Tracker](https://github.com/erlang/rebar3/issues)
88
- [Mailing List](http://lists.basho.com/mailman/listinfo/rebar_lists.basho.com)
9-
- Slack: #rebar3 on [Erlang slack](https://erlef.org/slack-invite/erlanger)
10-
- IRC: #rebar on Freenode
9+
- Slack: #rebar3 on [Erlang Slack](https://erlef.org/slack-invite/erlanger)
10+
- IRC: #rebar on freenode
1111
- [Contribution guidelines](https://github.com/erlang/rebar3/blob/master/CONTRIBUTING.md)
1212

1313
## Credits
@@ -17,4 +17,3 @@ excerpt: ""
1717
- Maintainers with admin rights:
1818
- [@tsloughter](https://github.com/tsloughter/)
1919
- [@ferd](https://github.com/ferd/)
20-

Diff for: content/en/docs/about/security-policy.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ excerpt: ""
66

77
Rebar3 is a build tool that by design allows arbitrary code execution from downloaded components. Scripts can be executed in all kinds of areas of a regular project workflow including (but not limited to): scripts to modify configuration files, "parse transforms" (macros), plugins, provider and shell hooks, and so on.
88

9-
Users of rebar3 should be aware of the nature of its model, and issues related to these parts of its design will not be considered to be security issues nor vulnerabilities.
9+
Users of Rebar3 should be aware of the nature of its model, and issues related to these parts of its design will not be considered to be security issues nor vulnerabilities.
1010

1111
## Reporting a Security Issue
1212

@@ -21,7 +21,7 @@ If you have not received a reply to your query within 48 hours, or have not hear
2121

2222
- One of the authenticated channels in the maintainers Keybase profiles
2323
- Open a GitHub issue directly
24-
- Ask on #rebar3 on the [official Erlang slack team](https://erlef.org/slack-invite/erlanger)
24+
- Ask on #rebar3 on the [official Erlang Slack team](https://erlef.org/slack-invite/erlanger)
2525
- Ask on #rebar on IRC on freenode
2626
- Ask on the [rebar mailing list](http://lists.basho.com/mailman/listinfo/rebar_lists.basho.com)
2727

Diff for: content/en/docs/basic_usage.md

+9-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Basic Usage"
33
weight: 2
44
description: >
5-
5+
66
---
77

88
## New App or Release
@@ -16,16 +16,11 @@ Umbrella projects' defining characteristic is that they can contain multiple top
1616
Rebar3 comes with templates for creating either types of project, callable through the `rebar3 new <template> <project-name>` command. The `<template>` value can be any of:
1717

1818
- `app`: a stateful OTP application with a supervision tree, as a single application project
19-
2019
- `lib`: a library OTP application (without supervision trees), useful for grouping together various modules, as a single application project
21-
2220
- `release`: an umbrella project ready to be released
23-
2421
- `escript`: a special form of single application project that can be built as a runnable script
25-
2622
- `plugin`: structure for a rebar3 plugin.
2723

28-
2924
For example:
3025

3126
```shell
@@ -69,7 +64,7 @@ Now you can add the dep to one of your project's application's .app.src file und
6964
]}.
7065
```
7166

72-
For more information on dependency handling view the [dependency documentation](/docs/configuration/dependencies)
67+
For more information on dependency handling view the [dependency documentation](/docs/configuration/dependencies)
7368

7469
## Building
7570

@@ -92,9 +87,10 @@ Output for installing dependencies, building releases and any other output writt
9287
```shell
9388
_build/
9489
└── default
95-
└── lib
90+
└── lib
9691
└── elli
9792
```
93+
9894
More about profiles and the `_build` directory can be found in the [profiles documentation page](/docs/profiles).
9995

10096
## Testing
@@ -112,7 +108,7 @@ Dependencies that are only needed for running tests can be placed in the `test`
112108
]}
113109
]}.
114110
```
115-
111+
116112
Now the first time `rebar3 ct` is run `meck` will be installed to `_build/test/lib/`. But it will not be added to `rebar.lock`.
117113

118114
```shell
@@ -128,7 +124,6 @@ Releases are built using [relx](https://github.com/erlware/relx).
128124

129125
Creating a new project with a release structure and default `relx` config in the `rebar.config` file run:
130126

131-
132127
```shell
133128
$ rebar3 new release myrel
134129
===> Writing myrel/apps/myrel/src/myrel_app.erl
@@ -141,6 +136,7 @@ $ rebar3 new release myrel
141136
===> Writing myrel/LICENSE
142137
===> Writing myrel/README.md
143138
```
139+
144140
Looking in `rebar.config` we find a couple elements that were not there in our application example.
145141

146142
```erlang
@@ -161,21 +157,21 @@ Looking in `rebar.config` we find a couple elements that were not there in our a
161157
]}.
162158
```
163159

164-
This configuration provides some nice defaults for building a release with relx for development (default profile) and for production (prod profile). When building a release for production we'll most likely want to create a target system (include erts) and definitely will not want the release to contain symlinks to apps (dev_mode false).
160+
This configuration provides some nice defaults for building a release with Relx for development (default profile) and for production (prod profile). When building a release for production we'll most likely want to create a target system (include erts) and definitely will not want the release to contain symlinks to apps (`dev_mode` `false`).
165161

166162
```shell
167163
$ rebar3 release
168164
===> Verifying default dependencies...
169165
===> Compiling myrel
170166
===> Starting relx build process ...
171-
===> Resolving OTP Applications from directories:
167+
===> Resolving OTP Applications from directories:
172168
_build/default/lib
173169
/usr/lib/erlang/lib
174170
===> Resolved myrel-0.1.0
175171
===> Dev mode enabled, release will be symlinked
176172
===> release successfully created!
177173
```
178-
174+
179175
With the default `rebar.config`, creating a compressed archive of the release as a target system is as simple as setting the profile to `prod` and running `tar`:
180176

181177
```shell
@@ -187,7 +183,6 @@ $ rebar3 as prod tar
187183
===> Release successfully assembled: _build/prod/rel/myrel
188184
===> Building release tarball myrel-0.1.0.tar.gz...
189185
===> Tarball successfully created: _build/prod/rel/myrel/myrel-0.1.0.tar.gz
190-
191186
```
192187

193188
For more details go to the [release section](/docs/deployment/releases).

Diff for: content/en/docs/commands.md

+16-18
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: "Commands"
33
weight: 4
44
description: >
5-
Usage of each rebar3 command.
5+
Usage of each Rebar3 command.
66
---
77

88
Each command represents a task which runs one or more providers to fulfill the task.
@@ -13,17 +13,17 @@ Higher order task which takes a profile name and list of tasks to run under that
1313

1414
## compile
1515

16-
After ensuring all dependencies are available, and fetching them if they are not, compile will compile the needed dependencies and the project's apps .app.src and .erl files.
16+
After ensuring all dependencies are available, and fetching them if they are not, compile will compile the needed dependencies and the project's apps' `.app.src` and `.erl` files.
1717

1818
| Option | Type | Description |
1919
| ---------------- | ---- | ---------------------------------------------------------|
2020
| `-d/--deps_only` | none | Only compile dependencies, no project apps will be built |
2121

2222
## clean
2323

24-
Removes compiled beam files from apps.
24+
Removes compiled BEAM files from apps.
2525

26-
The clean command by default removes the beam files for top-level applications. It does so while respecting profiles, which means that 'rebar3 clean' will only clean the default profile, and 'rebar3 as test clean' will only clean the test profile.
26+
The `clean` command by default removes the BEAM files for top-level applications. It does so while respecting profiles, which means that 'rebar3 clean' will only clean the default profile, and 'rebar3 as test clean' will only clean the test profile.
2727

2828
| Option | Type | Description |
2929
| -------------- | ------------------------------- | ------------------------------------------------------|
@@ -77,7 +77,7 @@ Runs in the `test` profile.
7777

7878
## cover
7979

80-
Performs coverage analysis on modules called by Common Test or Eunit test suites. Call as `rebar3 do ct, cover`, `rebar3 do eunit, cover` or the combination of both with `rebar3 do eunit, ct, cover` while the `{cover_enabled, true}` option is in your rebar config file or if the cover flags were used with these commands individually.
80+
Performs coverage analysis on modules called by Common Test or Eunit test suites. Call as `rebar3 do ct, cover`, `rebar3 do eunit, cover` or the combination of both with `rebar3 do eunit, ct, cover` while the `{cover_enabled, true}` option is in your rebar config file, or if the cover flags were used with these commands individually.
8181

8282
An HTML report is generated.
8383

@@ -91,22 +91,22 @@ Specific modules can be blacklisted from code coverage by adding `{cover_excl_mo
9191

9292
## deps
9393

94-
Lists dependencies, whether they're source or package dependencies, and whether they're locked or not. Those that are locked but not matching the lock file are followed by an asterisk (`*`)
94+
Lists dependencies, whether they're source or package dependencies, and whether they're locked or not. Those that are locked but not matching the lock file are followed by an asterisk (`*`).
9595

9696
## do
9797

98-
Higher order provider for running multiple tasks in a sequence, separated by commas. Example: `rebar3 do a, b, c`
98+
Higher order provider for running multiple tasks in a sequence, separated by commas. Example: `rebar3 do a, b, c`.
9999

100100
## dialyzer
101101

102-
Builds and keeps up-to-date a suitable PLT, and uses it to carry out success typing analysis on the current project.
102+
Builds and keeps up-to-date a suitable PLT (Persistent Lookup Table), and uses it to carry out success typing analysis on the current project.
103103

104104
| Option | Type | Description | Default |
105105
| ---------------------- | ------- | ------------------------------- | ------- |
106106
| `--update-plt`, `-u` | boolean | Enable updating the PLT. | true |
107107
| `--succ-typings`, `-s` | boolean | Enable success typing analysis. | true |
108108

109-
For instructions on suppressing warnings [Requesting or Suppressing Warnings in Source Files](http://erlang.org/doc/man/dialyzer.html) section of the Dialyzer documentation.
109+
For instructions on suppressing warnings read the [Requesting or Suppressing Warnings in Source Files](http://erlang.org/doc/man/dialyzer.html) section of the Dialyzer documentation.
110110

111111
PLT files are named `<prefix>_<otp_release>_plt`; The base PLT is a PLT containing the core applications often required for a project's PLT. One base PLT is created per OTP version and stored in `base_plt_location`. A base PLT is then used to build project PLTs.
112112

@@ -143,7 +143,7 @@ Generates an [escript](http://www.erlang.org/doc/man/escript.html) executable co
143143
| `escript_shebang` | string | Location of escript file to run. Defaults to `"#!/usr/bin/env escript\n"`. The end of line marker must be included in the string. |
144144
| `escript_comment` | string | Arbitrary comment to put into the generated escript. Must include a newline marker at the end. Defaults to `%%\n`. |
145145

146-
To override the default module name for the escript (which is expected to be the same as the `escript_name`), add `-escript main Module` to `escript_emu_args`
146+
To override the default module name for the escript (which is expected to be the same as the `escript_name`), add `-escript main Module` to `escript_emu_args`.
147147

148148
Example escript configuration from `relx`:
149149

@@ -154,7 +154,7 @@ Example escript configuration from `relx`:
154154

155155
## eunit
156156

157-
Runs eunit tests on project apps.
157+
Runs EUnit tests on project apps.
158158

159159
| Config Option | Type | Description |
160160
| ------------------ | ------------------------------- | ---------------------------------------------------------------------------------------- |
@@ -169,7 +169,7 @@ Runs in the `test` profile.
169169
## get-deps
170170

171171
{{< blocks/callout type="warning" title="Not Required">}}
172-
Unlike rebar2 this command is not required for fetching dependencies. The compile command will result in dependencies being fetched and then built if they aren't already. This command is useful if you have a specific use case that requires fetching dependencies separate from compilation.
172+
Unlike Rebar 2 this command is not required for fetching dependencies. The compile command will result in dependencies being fetched and then built if they aren't already. This command is useful if you have a specific use case that requires fetching dependencies separate from compilation.
173173
{{< /blocks/callout >}}
174174

175175
Fetch project dependencies.
@@ -196,7 +196,6 @@ Creates a new project from templates. See a list of available templates by provi
196196

197197
Print paths to build dirs in current profile.
198198

199-
200199
| Option | Type | Description |
201200
| ------------------- | ------------------------------- | ------------------------------------------------------------------------------ |
202201
| `--app` | Comma separated list of strings | Comma separated list of applications to return paths for. |
@@ -219,7 +218,7 @@ Creates a relup from two releases that were already built by calling `rebar3 rel
219218

220219
## report
221220

222-
Generates contextual data to include in bug reports
221+
Generates contextual data to include in bug reports.
223222

224223
## shell
225224

@@ -238,7 +237,7 @@ Runs a shell with project apps and deps in path. Intended for development use on
238237
| `--env-file` | string | Path to file of os environment variables to setup before expanding vars in config files |
239238
| `--user_drv_args` | string | Arguments passed to user_drv start function for creating custom shells |
240239

241-
The shell booted with this command has an agent running allowing to run rebar3 commands dynamically, such as `r3:compile()` or `r3:upgrade()`, and have new modules automatically reloaded. Specific namespaces can be reached by calling `r3:do(Namespace, Command)`. No arguments can be passed to these commands.
240+
The shell booted with this command has a running agent that allows running Rebar3 commands dynamically, such as `r3:compile()` or `r3:upgrade()`, and have new modules automatically reloaded. Specific namespaces can be reached by calling `r3:do(Namespace, Command)`. No arguments can be passed to these commands.
242241

243242
## tar
244243

@@ -262,7 +261,7 @@ Unlocks dependencies. If no dependency is mentioned, the command unlocks all of
262261

263262
A new lock file is then generated, or the existing lock file is removed in case no locks remain.
264263

265-
This command should be used when one or more dependencies have been taken out of rebar.config, but remain in the lock file.
264+
This command should be used when one or more dependencies have been taken out of `rebar.config`, but remain in the lock file.
266265

267266
## update
268267

@@ -274,8 +273,7 @@ Takes the current dependency specifications in `rebar.config` and fetches the mo
274273

275274
|Option|Type|Description|
276275
|----|----|----|
277-
|`<dependency>`|string|Dependencies to upgrade (comma-separated).
278-
If no dependency is mentioned, all dependencies are upgraded.|
276+
|`<dependency>`|string|Dependencies to upgrade (comma-separated). If no dependency is mentioned, all dependencies are upgraded.|
279277

280278
## version
281279

Diff for: content/en/docs/configuration/_index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ title: "Rebar3 Configuration"
33
linkTitle: Configuration
44
weight: 3
55
description: >
6-
Configuring rebar3 builds.
6+
Configuring Rebar3 builds.
77
---
88

Diff for: content/en/docs/configuration/config_script.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ If a `<name>.script` exists in the same directory as the original file (in the c
1010

1111
For convenience two bindings (variables) are available in a script during evaluation:
1212

13-
* `CONFIG` - result of [file:consult/1](http://www.erlang.org/doc/man/file.html#consult-1) if the script file being evaluated also exists
13+
- `CONFIG` - the result of [file:consult/1](http://www.erlang.org/doc/man/file.html#consult-1) if the script file being evaluated also exists
1414

1515
without the ``.script`` extension. Otherwise, `[]`.
1616

17-
* `SCRIPT` - filename of the script being evaluated
17+
- `SCRIPT` - the filename of the script being evaluated
1818

19-
In all cases, the data returned by the script, that is the last thing evaluated in the file, must be data in the same format as the original non-script file. For example, if I have `rebar.config.script` that script must return rebar configuration data, if it is an `<app-name>.app.src.script` it must return data in the Application Metadata Format.
19+
In all cases, the data returned by the script, that is the last thing evaluated in the file, must be data in the same format as the original non-script file. For example, if I have `rebar.config.script` that script must return Rebar3 configuration data, if it is an `<app-name>.app.src.script` it must return data in the Application Metadata Format.
2020

21-
Each script may be executed more than once within each rebar execution. It is a good idea to avoid scripts that have side-effects that are not [idempotent](https://en.wikipedia.org/wiki/Idempotence).
21+
Each script may be executed more than once within each Rebar3 execution. It is a good idea to avoid scripts that have side-effects that are not [idempotent](https://en.wikipedia.org/wiki/Idempotence).
2222

2323
## Simple Example
2424

@@ -35,6 +35,6 @@ case os:getenv("REBAR_DEPS") of
3535
end.
3636
```
3737

38-
Whenever you want to build 'properly' (which you should, regularly), simply call `unset REBAR_DEPS` (or equivalent), and perform a clean build.
38+
Whenever you want to build 'properly' (which you should, regularly), simply call `unset REBAR_DEPS` (or equivalent), and perform a clean build.
3939

40-
Note that `file:script/2` differs from `file:consult/1` in that only the result of the last expression is returned. You must therefore take care to return a list of config items. Before that, you may do any form of IO (including network), checking OS environment variables, reading files (perhaps calling `file:script/2` on other files) or writing files. You can basically use all OTP libs. As in `file:eval/2`, each expression is terminated with a full stop.
40+
Note that `file:script/2` differs from `file:consult/1` in that only the result of the last expression is returned. You must therefore take care to return a list of config items. Before that, you may do any form of I/O (including network), checking OS environment variables, reading files (perhaps calling `file:script/2` on other files) or writing files. You can basically use all OTP libs. As in `file:eval/2`, each expression is terminated with a full stop.

0 commit comments

Comments
 (0)