Skip to content

Commit be1dc19

Browse files
author
vvo
committed
0.23.0
* feat(build): add noConflict() for standalone build, fixes #133
1 parent 8baf301 commit be1dc19

9 files changed

+24
-14
lines changed

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,8 @@ This JavaScript library adds a fast and fully-featured auto-completion menu to y
2222
- [Installation](#installation)
2323
- [jsDelivr](#jsdelivr)
2424
- [cdnjs](#cdnjs)
25-
- [From Bower](#from-bower)
26-
- [From source](#from-source)
27-
- [Build/Dist](#builddist)
25+
- [Bower](#bower)
26+
- [Source dist/](#source-dist)
2827
- [Browserify](#browserify)
2928
- [Usage](#usage)
3029
- [Standalone](#standalone)
@@ -689,7 +688,7 @@ npm run build
689688
# Update the file CHANGELOG.md by looking at git log, have a look
690689
# at previous lines to know what to write, how to write it
691690
# /Manual operation
692-
./node_modules/.bin/doctoc README.md --notitle --maxlevel 2
691+
./node_modules/.bin/doctoc --notitle --maxlevel 3 README.md
693692
git add README.md package.json bower.json dist/
694693
git commit
695694
# First line: major.minor.patch

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "algolia-autocomplete.js",
33
"main": "dist/autocomplete.js",
4-
"version": "0.22.1",
4+
"version": "0.23.0",
55
"homepage": "https://github.com/algolia/autocomplete.js",
66
"authors": [
77
"Algolia Team <[email protected]>"

dist/autocomplete.angular.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* autocomplete.js 0.22.1
2+
* autocomplete.js 0.23.0
33
* https://github.com/algolia/autocomplete.js
44
* Copyright 2016 Algolia, Inc. and other contributors; Licensed MIT
55
*/

dist/autocomplete.angular.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/autocomplete.jquery.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* autocomplete.js 0.22.1
2+
* autocomplete.js 0.23.0
33
* https://github.com/algolia/autocomplete.js
44
* Copyright 2016 Algolia, Inc. and other contributors; Licensed MIT
55
*/

dist/autocomplete.jquery.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/autocomplete.js

+12-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*!
2-
* autocomplete.js 0.22.1
2+
* autocomplete.js 0.23.0
33
* https://github.com/algolia/autocomplete.js
44
* Copyright 2016 Algolia, Inc. and other contributors; Licensed MIT
55
*/
@@ -141,6 +141,17 @@ return /******/ (function(modules) { // webpackBootstrap
141141

142142
autocomplete.sources = Typeahead.sources;
143143

144+
var wasAutocompleteSet = 'autocomplete' in window;
145+
var oldAutocomplete = window.autocomplete;
146+
autocomplete.noConflict = function noConflict() {
147+
if (wasAutocompleteSet) {
148+
window.autocomplete = oldAutocomplete;
149+
} else {
150+
delete window.autocomplete;
151+
}
152+
return autocomplete;
153+
};
154+
144155
module.exports = autocomplete;
145156

146157

dist/autocomplete.min.js

+3-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@
7171
"test:watch": "karma start",
7272
"test:ci": "./test/ci.sh"
7373
},
74-
"version": "0.22.1",
74+
"version": "0.23.0",
7575
"main": "index.js"
7676
}

0 commit comments

Comments
 (0)