typeahead-requirejs

WebJar for typeahead-requirejs

License

License

MIT
Categories

Categories

Github Development Tools Version Controls
GroupId

GroupId

org.webjars.bower
ArtifactId

ArtifactId

github-com-nikcub-typeahead
Last Version

Last Version

0.11.1
Release Date

Release Date

Type

Type

jar
Description

Description

typeahead-requirejs
WebJar for typeahead-requirejs
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/nikcub/typeahead

Download github-com-nikcub-typeahead

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.bower/github-com-nikcub-typeahead/ -->
<dependency>
    <groupId>org.webjars.bower</groupId>
    <artifactId>github-com-nikcub-typeahead</artifactId>
    <version>0.11.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.bower/github-com-nikcub-typeahead/
implementation 'org.webjars.bower:github-com-nikcub-typeahead:0.11.1'
// https://jarcasting.com/artifacts/org.webjars.bower/github-com-nikcub-typeahead/
implementation ("org.webjars.bower:github-com-nikcub-typeahead:0.11.1")
'org.webjars.bower:github-com-nikcub-typeahead:jar:0.11.1'
<dependency org="org.webjars.bower" name="github-com-nikcub-typeahead" rev="0.11.1">
  <artifact name="github-com-nikcub-typeahead" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.bower', module='github-com-nikcub-typeahead', version='0.11.1')
)
libraryDependencies += "org.webjars.bower" % "github-com-nikcub-typeahead" % "0.11.1"
[org.webjars.bower/github-com-nikcub-typeahead "0.11.1"]

Dependencies

compile (1)

Group / Artifact Type Version
org.webjars.bower : jquery jar [1.7,)

Project Modules

There are no modules declared in this project.

typeahead.js requirejs compatability fork

Fork Information This is a fork of Twitter's Typeahead with RequireJS support. The release version from twitter defines typeahead as 'typeahead.js' which requirejs attempts to load as a local file called typeahead.js rather than as a module because of the .js in the name

Renames typeahead.js as typeahead and defines the AMD modules correctly for loading

Fork Install

This fork is registerd in bower as typeahead-requirejs

$ bower install --save typeahead-requirejs

Setup requirejs to load Bloodhound and typeahead separately

requirejs.config({
  baseUrl: '/javascripts/',
  paths: {
  'typeahead': 'vendor/typeahead/dist/typeahead.jquery',
  'bloodhound': 'vendor/typeahead/dist/bloodhound'
});

// Loads
require(['bloodhound', 'typeahead']);

will load typeahead correctly

Other changes:

  • Define bower as a dev depandancy (remove dependancy on global bower)
  • Define grunt-cli as a dev depandancy (remove dependancy on global grunt)

Original README file below

============================

build status Built with Grunt

typeahead.js

Inspired by twitter.com's autocomplete search functionality, typeahead.js is a flexible JavaScript library that provides a strong foundation for building robust typeaheads.

The typeahead.js library consists of 2 components: the suggestion engine, Bloodhound, and the UI view, Typeahead. The suggestion engine is responsible for computing suggestions for a given query. The UI view is responsible for rendering suggestions and handling DOM interactions. Both components can be used separately, but when used together, they can provide a rich typeahead experience.

Getting Started

How you acquire typeahead.js is up to you.

Preferred method:

  • Install with Bower: $ bower install typeahead.js

Other methods:

Note: both bloodhound.js and typeahead.jquery.js have a dependency on jQuery 1.9+.

Documentation

Examples

For some working examples of typeahead.js, visit the examples page.

Browser Support

  • Chrome
  • Firefox 3.5+
  • Safari 4+
  • Internet Explorer 8+
  • Opera 11+

NOTE: typeahead.js is not tested on mobile browsers.

Customer Support

For general questions about typeahead.js, tweet at @typeahead.

For technical questions, you should post a question on Stack Overflow and tag it with typeahead.js.

Issues

Discovered a bug? Please create an issue here on GitHub!

https://github.com/twitter/typeahead.js/issues

Versioning

For transparency and insight into our release cycle, releases will be numbered with the following format:

<major>.<minor>.<patch>

And constructed with the following guidelines:

  • Breaking backwards compatibility bumps the major
  • New additions without breaking backwards compatibility bumps the minor
  • Bug fixes and misc changes bump the patch

For more information on semantic versioning, please visit http://semver.org/.

Testing

Tests are written using Jasmine and ran with Karma. To run the test suite with PhantomJS, run $ npm test.

Developers

If you plan on contributing to typeahead.js, be sure to read the contributing guidelines. A good starting place for new contributors are issues labeled with entry-level. Entry-level issues tend to require minor changes and provide developers a chance to get more familiar with typeahead.js before taking on more challenging work.

In order to build and test typeahead.js, you'll need to install its dev dependencies ($ npm install) and have grunt-cli installed ($ npm install -g grunt-cli). Below is an overview of the available Grunt tasks that'll be useful in development.

  • grunt build – Builds typeahead.js from source.
  • grunt lint – Runs source and test files through JSHint.
  • grunt watch – Rebuilds typeahead.js whenever a source file is modified.
  • grunt server – Serves files from the root of typeahead.js on localhost:8888. Useful for using test/playground.html for debugging/testing.
  • grunt dev – Runs grunt watch and grunt server in parallel.

Maintainers

Authors

License

Copyright 2013 Twitter, Inc.

Licensed under the MIT License

Versions

Version
0.11.1