Skip to content

Commit

Permalink
Add sample/README to give sample usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
regisd committed Oct 15, 2018
1 parent 95c2e7f commit 52c759d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ depend on the official release binaries provided by the Pandoc project.

# Using these rules

## Set up your workspace

Add the following to your `WORKSPACE` file:

```python
http_archive(
name = "bazel_pandoc",
sha256 = "<checksum>",
strip_prefix = "bazel-pandoc-<release>",
url = "https://github.com/ProdriveTechnologies/bazel-pandoc/archive/v<release>.tar.gz",
)
Expand All @@ -24,6 +25,8 @@ load("@bazel_pandoc//:repositories.bzl", "pandoc_repositories")
pandoc_repositories()
```

## Use the `pandoc` rule in BUILD files

You can then add directives along these lines to your `BUILD.bazel` files:

```python
Expand Down
18 changes: 18 additions & 0 deletions sample/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Sample usage of the pandoc rule

Once you have set up your workspace,
you can generate the [README](../README.md) in a multitude of formats.

For instance:

```sh
bazel build @bazel_pandoc//sample:readme_plain
bazel build @bazel_pandoc//sample:readme_html
bazel build @bazel_pandoc//sample:readme_epub
```

You can also produce the README in all formats know to the rule:

```sh
bazel build @bazel_pandoc//sample/...
```

0 comments on commit 52c759d

Please sign in to comment.