Skip to content

Commit

Permalink
Fix examples with the libsonnet convention.
Browse files Browse the repository at this point in the history
  • Loading branch information
yugui committed Sep 30, 2016
1 parent 1056cdc commit 4eab3ad
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -257,17 +257,17 @@ Suppose you have the following directory structure:
WORKSPACE
workflows/
BUILD
workflow.jsonnet
workflow.libsonnet
wordcount.jsonnet
intersection.jsonnet
```

Say that `workflow.jsonnet` is a base configuration library for a workflow
Say that `workflow.libsonnet` is a base configuration library for a workflow
scheduling system and `wordcount.jsonnet` and `intersection.jsonnet` both
import `workflow.jsonnet` to define workflows for performing a wordcount and
import `workflow.libsonnet` to define workflows for performing a wordcount and
intersection of two files, respectively.

First, create a `jsonnet_library` target with `workflow.jsonnet`:
First, create a `jsonnet_library` target with `workflow.libsonnet`:

`workflows/BUILD`:

Expand All @@ -276,7 +276,7 @@ load("@io_bazel_rules_jsonnet//jsonnet:jsonnet.bzl", "jsonnet_library")

jsonnet_library(
name = "workflow",
srcs = ["workflow.jsonnet"],
srcs = ["workflow.libsonnet"],
)
```

Expand Down Expand Up @@ -469,12 +469,12 @@ Suppose you have the following directory structure:
WORKSPACE
config/
BUILD
base_config.jsonnet
base_config.libsonnet
test_config.jsonnet
test_config.json
```

Suppose that `base_config.jsonnet` is a library Jsonnet file, containing the
Suppose that `base_config.libsonnet` is a library Jsonnet file, containing the
base configuration for a service. Suppose that `test_config.jsonnet` is a test
configuration file that is used to test `base_config.jsonnet`, and
`test_config.json` is the expected JSON output from compiling
Expand All @@ -496,7 +496,7 @@ load(

jsonnet_library(
name = "base_config",
srcs = ["base_config.jsonnet"],
srcs = ["base_config.libsonnet"],
)

jsonnet_to_json_test(
Expand All @@ -518,7 +518,7 @@ Suppose you have the following directory structure:
WORKSPACE
config/
BUILD
base_config.jsonnet
base_config.libsonnet
invalid_config.jsonnet
invalid_config.output
```
Expand All @@ -544,7 +544,7 @@ load(

jsonnet_library(
name = "base_config",
srcs = ["base_config.jsonnet"],
srcs = ["base_config.libsonnet"],
)

jsonnet_to_json_test(
Expand Down
2 changes: 1 addition & 1 deletion examples/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ load(

jsonnet_library(
name = "workflow",
srcs = ["workflow.jsonnet"],
srcs = ["workflow.libsonnet"],
)

jsonnet_to_json(
Expand Down
2 changes: 1 addition & 1 deletion examples/intersection.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

local workflow = import "examples/workflow.jsonnet";
local workflow = import "examples/workflow.libsonnet";

// Workflow that performs an intersection of two files using shell commands.
{
Expand Down
2 changes: 1 addition & 1 deletion examples/wordcount.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.

local workflow = import "examples/workflow.jsonnet";
local workflow = import "examples/workflow.libsonnet";

// Workflow that performs a wordcount using shell commands.
{
Expand Down
File renamed without changes.

0 comments on commit 4eab3ad

Please sign in to comment.