Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ThibautGery/ban-autocomplete-react

Autocomplete input for french addresses
https://github.com/ThibautGery/ban-autocomplete-react

Last synced: 4 months ago
JSON representation

Autocomplete input for french addresses

Awesome Lists containing this project

README

        

Base adresse nationale autocomplete box (React)
======================
[![Circle CI](https://circleci.com/gh/ThibautGery/ban-autocomplete-react.svg?style=svg)](https://circleci.com/gh/ThibautGery/ban-autocomplete-react)
[![Coverage Status](https://coveralls.io/repos/github/ThibautGery/ban-autocomplete-react/badge.svg?branch=master)](https://coveralls.io/github/ThibautGery/ban-autocomplete-react?branch=master)

> React component to autocomplete addresses using the [Base adresses nationale (BAN) API](http://adresse.data.gouv.fr/api/).

Requirements
------------

This widget is written in ECMA 2015.

* Node
* NPM
* Chrome (to run the test)

Install
-------

```bash
cd path/to/your/project
npm install ban-autocomplete-react --save
```

Setup
-----

#### Simple script reference

```html



```

See an example in [index.html](src/client/index.html).

#### Webpack

```js
import AutocompleteBan from 'ban-autocomplete-react';
//If you have a div#widget-container to show the widget
render(, document.getElementById('widget-container'));
```

See an example in [index.jsx](examples/app/index.jsx).

Development
-----------

Rebuild the component every time the sources change :

```
npm run dev
```

Build the component :

```
npm run build
```

Run the integration test :

```
npm run dev
npm run test
```