<commit_before>instantsearch-ion.rangeSlider
=================
<commit_msg>chore(readme): initial import<commit_after>instantsearch-ion.rangeSlider
=================

This JavaScript library embeds the awesome [ion.rangeSlider](https://github.com/IonDen/ion.rangeSlider) as an [instantsearch.js](https://github.com/algolia/instantsearch.js) widget.

[![build status](https://travis-ci.org/algolia/instantsearch-ion.rangeSlider.svg?branch=master)](http://travis-ci.org/algolia/instantsearch-ion.rangeSlider)
[![NPM version](https://badge.fury.io/js/instantsearch-ion.rangeSlider.svg)](http://badge.fury.io/js/instantsearch-ion.rangeSlider)

Table of Contents
-----------------

* [Usage](#usage)
* [Development](#development)
* [Testing](#testing)
* [Credits](#credits)

Usage
------

To use the `ion.rangeSlider` as a widget, do as follow:

 * include the `ion.rangeSlider` theme, for instance the `ion.rangeSlider.css` and `ion.rangeSlider.skinFlat.css` stylesheets,
 * include the `instantsearch-ion.rangeSlider.min.js` JavaScript script,
 * and instantiate the `instantsearch.widgets.ionRangeSlider` widget.

```html
<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" type="text/css" href="....../ion.rangeSlider.css">
    <link rel="stylesheet" type="text/css" href="....../ion.rangeSlider.skinFlat.css">
  </head>
  <body>
    <div id="slider"></div>
    <!-- [...] -->
    <script src="......../instantsearch-ion.rangeSlider.min.js"></script>
    <script>
      var search = instantsearch({
        appId: 'YourApplicationID',
        apiKey: 'YourSearchOnlyAPIKey',
        indexName: 'YourIndexName'
      });
      // [...]
      search.addWidget(
        instantsearch.widgets.ionRangeSlider({
          container: '#slider',
          facetName: 'YourAttribute'
        })
      );
      // [...]
      search.start();
    </script>
  </body>
</html>
```

Development
------

To start developing, you can use the following commands:

```sh
$ npm install
$ npm run dev
$ open http://localhost:8888/test/playground.html
```

Linting is done with [eslint](http://eslint.org/) and [Algolia's configuration](https://github.com/algolia/eslint-config-algolia) and can be run with:

```sh
$ npm run lint
```

Testing
------

Unit tests are written using [Jasmine](http://jasmine.github.io/) and ran with [Karma](http://karma-runner.github.io/). Integration tests are using [Mocha](http://mochajs.org/) and [Saucelabs](https://saucelabs.com/).

To run the unit tests suite run:

```sh
$ npm test
```

To run the integration tests suite run:

```sh
$ npm run build
$ npm run server
$ ngrok 8888
$ TEST_HOST=http://YOUR_NGROK_ID.ngrok.com SAUCE_ACCESS_KEY=YOUR_KEY SAUCE_USERNAME=YOUR_USERNAME./node_modules/mocha/bin/mocha --harmony -R spec ./test/integration/test.js
```

Credits
------

 * **Ion.RangeSlider**. An easy, flexible and responsive range slider with tons of options.
{'fraction_non_alphanumeric': 0.18449290411907235, 'fraction_numerical': 0.0027691242644513675, 'mean_word_length': 3.624, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6010535', 'n_tokens_mistral': 988, 'n_tokens_neox': 938, 'n_words': 196}