From 7c3deb495ac9d8f9ce6d80e8a2667f10e3c0ac9b Mon Sep 17 00:00:00 2001 From: Tony Allevato Date: Tue, 31 Oct 2017 07:15:32 -0700 Subject: [PATCH] Add "Getting Started" section to README --- README.md | 19 +++++++++++++++++-- 1 file 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"—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")