Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/ThibautGery/ban-autocomplete-react
- Owner: ThibautGery
- Created: 2016-04-20T09:38:41.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-04-27T13:45:27.000Z (over 8 years ago)
- Last Synced: 2024-08-16T14:24:09.993Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 85.9 KB
- Stars: 18
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.MD
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
```