Skip to content

Latest commit

 

History

History
72 lines (50 loc) · 1.44 KB

File metadata and controls

72 lines (50 loc) · 1.44 KB

Base adresse nationale autocomplete box (React)

Circle CI Coverage Status

React component to autocomplete addresses using the Base adresses nationale (BAN) API.

Requirements

This widget is written in ECMA 2015.

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

Install

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

Setup

Simple script reference

<body>
  <div>
    <script src="./node_modules/ban-autocomplete-react/src/client/public/bundle.js" type="text/javascript"></script>
  </div>
</body>

See an example in index.html.

Webpack

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

See an example in 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