This project is designed to simply show how AddressFinder can be included with an AMD library, in this case RequireJS.
npm install
grunt server
- reqwest - Mirco library for ajax requests.
- neat-complete - The core autosuggest library for AddressFinder.
both available via bower
/app/scripts/main.js
require.config({
shim:{
'addressfinder': {
deps: ['reqwest', 'neat_complete']
}
},
paths: {
'addressfinder': 'https://api.addressfinder.io/assets/v3/core',
'reqwest': '../../bower_components/reqwest/reqwest',
'neat_complete': '../../bower_components/neat-complete/lib/neat_complete'
}
});
build.js
({
baseUrl: "app/scripts",
paths: {
"addressfinder": "empty:"
},
name: "main",
mainConfigFile: 'app/scripts/main.js',
out: "dist/scripts/main.js"
})