aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorTony Allevato <allevato@google.com>2017-10-31 07:15:32 -0700
committerTony Allevato <tony.allevato@gmail.com>2018-02-28 07:57:27 -0800
commit7c3deb495ac9d8f9ce6d80e8a2667f10e3c0ac9b (patch)
treeac90f038edc4cded3d787987c05fc98747b56f0d /README.md
parent912a12b6978ca664566bc54f98225c9fe54f83d5 (diff)
downloadbazel-skylib-7c3deb495ac9d8f9ce6d80e8a2667f10e3c0ac9b.tar.gz
Add "Getting Started" section to README
Diffstat (limited to 'README.md')
-rw-r--r--README.md19
1 files changed, 17 insertions, 2 deletions
diff --git a/README.md b/README.md
index d1672a9..bd44765 100644
--- a/README.md
+++ b/README.md
@@ -14,8 +14,23 @@ Each of the `.bzl` files in the `lib` directory defines a "module"&mdash;a
be loaded as a single unit, for convenience. The top-level file `lib.bzl` acts
as an index from which the other modules can be imported.
-To use the functionality here, import the modules you need from `lib.bzl` and
-access the symbols by dotting into those structs:
+## Getting Started
+
+Add the following to your `WORKSPACE` file to import the Skylib repository into
+your workspace. Replace the version number in the `tag` attribute with the
+version you wish to depend on:
+
+```python
+git_repository(
+ name = "bazel_skylib",
+ remote = "https://github.com/bazelbuild/bazel-skylib.git",
+ tag = "0.1.0", # change this to use a different release
+)
+```
+
+Then, in the `BUILD` and/or `*.bzl` files in your own workspace, you can load
+the modules (listed [below](#list-of-modules)) from `lib.bzl` and access the
+symbols by dotting into those structs:
```python
load("@bazel_skylib//:lib.bzl", "paths", "shell")