Skip to content

AddressFinder/addressfinder_requirejs_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AddressFinder RequireJS Demo

This project is designed to simply show how AddressFinder can be included with an AMD library, in this case RequireJS.

Setup

npm install
grunt server

Dependencies

  • reqwest - Mirco library for ajax requests.
  • neat-complete - The core autosuggest library for AddressFinder.

both available via bower

RequireJS config

/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 config

build.js

({
    baseUrl: "app/scripts",
    paths: {
      "addressfinder": "empty:"
    },
    name: "main",
    mainConfigFile: 'app/scripts/main.js',
    out: "dist/scripts/main.js"
})

About

AddressFinder - demo of AMD using RequireJS

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •