From d241f2d6efa35d829d172f7fec4237a51a1df135 Mon Sep 17 00:00:00 2001 From: Thiago Souza Date: Mon, 24 Apr 2017 14:30:33 -0300 Subject: [PATCH] Update Browser Builds docs (#528) * Document how to properly install using npm * The standard elasticsearch-js build does not works in browser anymore * The React sample can be confusing nowadays. Since it refers to an older version that used to work in the browser, now that there is a browser specific build, the sample is somewhat confusing. * Closes https://github.com/elastic/elasticsearch-js/issues/527 Since it refers to an older version that used to work in the browser, now that there is a browser specific build, the sample is somewhat confusing. * Fix typo --- docs/browser_builds.asciidoc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/docs/browser_builds.asciidoc b/docs/browser_builds.asciidoc index 4f004dab2..0ff25d6d7 100644 --- a/docs/browser_builds.asciidoc +++ b/docs/browser_builds.asciidoc @@ -13,11 +13,17 @@ If you use bower to manage your dependencies, then just run: bower install elasticsearch --------- +=== NPM +If you use npm to manage your dependencies, then just run: + +[source,shell] +--------- +npm install elasticsearch-browser +--------- + === Download * v13.0.0-rc2: https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-13.0.0-rc2.zip[zip], https://download.elasticsearch.org/elasticsearch/elasticsearch-js/elasticsearch-js-13.0.0-rc2.tar.gz[tar.gz] -NOTE: Here's an example that integrates elasticsearch.js with React https://github.com/scotchfield/elasticsearch-react-example/[on GitHub] - === Angular Build * Registers an `esFactory` factory in the `"elasticsearch"` module * Uses Angular's `$http` service