From b8c31c88520fe94b81e1e891455b2e559e3bdb6b Mon Sep 17 00:00:00 2001 From: Paul Johnston Date: Mon, 26 Sep 2016 23:28:49 -0600 Subject: [PATCH] Update readme and drop 0.3.0 from build matrix. --- .travis.yml | 1 - README.md | 22 +++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.travis.yml b/.travis.yml index 35d7158..4b88bd6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,7 +5,6 @@ language: node_js env: - V=HEAD URL=http://ci.bazel.io/job/Bazel/JAVA_VERSION=1.8,PLATFORM_NAME=linux-x86_64/lastSuccessfulBuild/artifact/output/ci/bazel--installer.sh FLAGS='--worker_verbose --strategy=Javac=worker --strategy=JsChecker=worker' - V=0.3.1 URL=https://github.com/bazelbuild/bazel/releases/download/0.3.1/bazel-0.3.1-installer-linux-x86_64.sh FLAGS='' - - V=0.3.0 URL=https://github.com/bazelbuild/bazel/releases/download/0.3.0/bazel-0.3.0-installer-linux-x86_64.sh FLAGS='' before_install: - wget -O install.sh $URL diff --git a/README.md b/README.md index 672dbfd..a85b2c3 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,9 @@ # Installation -load `rules_node` in your `WORKSPACE` and load main repository -dependencies: +Put `rules_node` in your `WORKSPACE` and load the main repository +dependencies. This will download the nodejs toolchain including +`node` and `npm`. ```python git_repository( @@ -14,13 +15,13 @@ git_repository( load("@org_pubref_rules_node//node:rules.bzl", "node_repositories") -node_repositories() # installs node toolchain incl. 'node' and 'npm' +node_repositories() ``` # Rules | Rule | Description | -| :--- | ---: | :---------- | +| ---: | :---------- | | [node_repositories](#node_repositories) | Install node toolchain. | | [npm_library](#npm_library) | Declare an npm dependency. | | [node_binary](#node_binary) | Build or execute a nodejs script. | @@ -49,11 +50,11 @@ node_binary( ) ``` -## node_\repositories +## node_repositories WORKSPACE rule. No current options. -## npm_\library +## npm_library BUILD rule. Declares a set of npm dependencies. Functionally equivalent to `npm install --global` (global being relative to the npm @@ -66,7 +67,14 @@ Takes two forms: 1. **Multiple import**: uses a string_dict declaring the `name@version` dependency. (see `react-stack` above). -## node_\binary +## node_binary BUILD rule. Create an executable script that will run the file named in the `main_script` attribute. + + +> **WARNING**: these rules are not hermetic or secure! It trusts that +> the `npm install` command does what is it supposed to do. There is +> no current support for valdating that a particular npm package(s) +> matches a sha256 (this is the the norm for npm, but it is +> sub-standard for bazel).