Skip to content

Commit

Permalink
Regenerate docs + remove maprule.md (bazelbuild#137)
Browse files Browse the repository at this point in the history
Maprule is hidden, see bazelbuild@3721d32
  • Loading branch information
laszlocsomor committed Mar 26, 2019
1 parent 4c26bf4 commit 084758f
Show file tree
Hide file tree
Showing 5 changed files with 223 additions and 574 deletions.
73 changes: 73 additions & 0 deletions docs/copy_file_doc.md
@@ -0,0 +1,73 @@
## copy_file

<pre>
copy_file(<a href="#copy_file-name">name</a>, <a href="#copy_file-src">src</a>, <a href="#copy_file-out">out</a>, <a href="#copy_file-is_executable">is_executable</a>, <a href="#copy_file-kwargs">kwargs</a>)
</pre>

Copies a file to another location.

`native.genrule()` is sometimes used to copy files (often wishing to rename them). The 'copy_file' rule does this with a simpler interface than genrule.

This rule uses a Bash command on Linux/macOS/non-Windows, and a cmd.exe command on Windows (no Bash is required).


### Parameters

<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="copy_file-name">
<td><code>name</code></td>
<td>
required.
<p>
Name of the rule.
</p>
</td>
</tr>
<tr id="copy_file-src">
<td><code>src</code></td>
<td>
required.
<p>
A Label. The file to make a copy of. (Can also be the label of a rule
that generates a file.)
</p>
</td>
</tr>
<tr id="copy_file-out">
<td><code>out</code></td>
<td>
required.
<p>
Path of the output file, relative to this package.
</p>
</td>
</tr>
<tr id="copy_file-is_executable">
<td><code>is_executable</code></td>
<td>
optional. default is <code>False</code>
<p>
A boolean. Whether to make the output file executable. When
True, the rule's output can be executed using `bazel run` and can be
in the srcs of binary and test rules that require executable sources.
</p>
</td>
</tr>
<tr id="copy_file-kwargs">
<td><code>kwargs</code></td>
<td>
optional.
<p>
further keyword arguments, e.g. `visibility`
</p>
</td>
</tr>
</tbody>
</table>


11 changes: 10 additions & 1 deletion docs/dicts_doc.md
@@ -1,7 +1,7 @@
## dicts.add

<pre>
dicts.add(<a href="#dicts.add-dictionaries">dictionaries</a>)
dicts.add(<a href="#dicts.add-dictionaries">dictionaries</a>, <a href="#dicts.add-kwargs">kwargs</a>)
</pre>

Returns a new `dict` that has all the entries of the given dictionaries.
Expand Down Expand Up @@ -32,6 +32,15 @@ dictionary, and the sum of a single dictionary is a copy of itself.
</p>
</td>
</tr>
<tr id="dicts.add-kwargs">
<td><code>kwargs</code></td>
<td>
optional.
<p>
Additional dictionary passed as keyword args.
</p>
</td>
</tr>
</tbody>
</table>

Expand Down
72 changes: 72 additions & 0 deletions docs/diff_test_doc.md
@@ -0,0 +1,72 @@
## diff_test

<pre>
diff_test(<a href="#diff_test-name">name</a>, <a href="#diff_test-file1">file1</a>, <a href="#diff_test-file2">file2</a>, <a href="#diff_test-expect_same">expect_same</a>, <a href="#diff_test-kwargs">kwargs</a>)
</pre>

A test that compares the contents of two files.

The test succeeds when the files are expected to be the same (with regard to
file contents) and are in fact the same, or when the files are expected to
be different and are in fact so.


### Parameters

<table class="params-table">
<colgroup>
<col class="col-param" />
<col class="col-description" />
</colgroup>
<tbody>
<tr id="diff_test-name">
<td><code>name</code></td>
<td>
required.
<p>
The name of the test rule.
</p>
</td>
</tr>
<tr id="diff_test-file1">
<td><code>file1</code></td>
<td>
required.
<p>
Label of the file to compare to <code>file2</code>.
</p>
</td>
</tr>
<tr id="diff_test-file2">
<td><code>file2</code></td>
<td>
required.
<p>
Label of the file to compare to <code>file1</code>.
</p>
</td>
</tr>
<tr id="diff_test-expect_same">
<td><code>expect_same</code></td>
<td>
optional. default is <code>True</code>
<p>
Whether the files are expected to be the same or not. The
test passes if this is True and the files are the same, or if this is
False and the files are not the same.
</p>
</td>
</tr>
<tr id="diff_test-kwargs">
<td><code>kwargs</code></td>
<td>
optional.
<p>
The <a href="https://docs.bazel.build/versions/master/be/common-definitions.html#common-attributes-tests">common attributes for tests</a>.
</p>
</td>
</tr>
</tbody>
</table>


0 comments on commit 084758f

Please sign in to comment.