Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
Fix for uglification breaking bulbs-autocomplete, changed to best pra…
Browse files Browse the repository at this point in the history
…ctice syntax
  • Loading branch information
Cresten St. Clair committed Mar 3, 2015
1 parent ba4782a commit 34b474b
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bulbs-autocomplete",
"version": "0.1.14",
"version": "0.1.15",
"appPath": "src",
"description": "America's Finest Autocomplete module",
"main": [
Expand Down
16 changes: 9 additions & 7 deletions dist/bulbs-autocomplete.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Source: src/bulbs-autocomplete-suggest/bulbs-autocomplete-suggest-group-by/bulbs-autocomplete-suggest-group-by-directive.js
angular.module('BulbsAutocomplete.suggest.groupBy.directive', [])
.directive('bulbsAutocompleteSuggestGroupBy', function (BULBS_AUTOCOMPLETE_EVENT_KEYPRESS) {
.directive('bulbsAutocompleteSuggestGroupBy', ['BULBS_AUTOCOMPLETE_EVENT_KEYPRESS', function (BULBS_AUTOCOMPLETE_EVENT_KEYPRESS) {
return {
restrict: 'E',
templateUrl: 'src/bulbs-autocomplete-suggest/bulbs-autocomplete-suggest-group-by/bulbs-autocomplete-suggest-group-by.html',
Expand Down Expand Up @@ -85,7 +85,7 @@ angular.module('BulbsAutocomplete.suggest.groupBy.directive', [])
});
}
};
});
}]);

// Source: src/bulbs-autocomplete-suggest/bulbs-autocomplete-suggest-group-by/bulbs-autocomplete-suggest-group-by.js
angular.module('BulbsAutocomplete.suggest.groupBy', [
Expand All @@ -95,7 +95,7 @@ angular.module('BulbsAutocomplete.suggest.groupBy', [

// Source: src/bulbs-autocomplete-suggest/bulbs-autocomplete-suggest/bulbs-autocomplete-suggest-directive.js
angular.module('BulbsAutocomplete.suggest.directive', [])
.directive('bulbsAutocompleteSuggest', function (BULBS_AUTOCOMPLETE_EVENT_KEYPRESS) {
.directive('bulbsAutocompleteSuggest', ['BULBS_AUTOCOMPLETE_EVENT_KEYPRESS', function (BULBS_AUTOCOMPLETE_EVENT_KEYPRESS) {
return {
restrict: 'E',
templateUrl: 'src/bulbs-autocomplete-suggest/bulbs-autocomplete-suggest/bulbs-autocomplete-suggest.html',
Expand All @@ -113,7 +113,9 @@ angular.module('BulbsAutocomplete.suggest.directive', [])
case 13:
// enter
if (scope.selectedIndex !== -1) {
scope.onSelect({selection: scope.items[scope.selectedIndex]});
scope.onSelect({
selection: scope.items[scope.selectedIndex]
});
}
break;
case 38:
Expand All @@ -129,7 +131,7 @@ angular.module('BulbsAutocomplete.suggest.directive', [])
});
}
};
});
}]);

// Source: src/bulbs-autocomplete-suggest/bulbs-autocomplete-suggest/bulbs-autocomplete-suggest.js
angular.module('BulbsAutocomplete.suggest', [
Expand All @@ -139,7 +141,7 @@ angular.module('BulbsAutocomplete.suggest', [

// Source: src/bulbs-autocomplete/bulbs-autocomplete-factory.js
angular.module('BulbsAutocomplete.factory', [])
.factory('BulbsAutocomplete', function () {
.factory('BulbsAutocomplete', [function () {

var BulbsAutocomplete = function (getItemsFunction) {
if (_.isFunction(getItemsFunction)) {
Expand All @@ -162,7 +164,7 @@ angular.module('BulbsAutocomplete.factory', [])
};

return BulbsAutocomplete;
});
}]);

// Source: src/bulbs-autocomplete/bulbs-autocomplete.js
angular.module('BulbsAutocomplete', [
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bulbs-autocomplete",
"version": "0.1.14",
"version": "0.1.15",
"dependencies": {},
"devDependencies": {
"chromedriver": "^2.13.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

angular.module('BulbsAutocomplete.suggest.groupBy.directive', [])
.directive('bulbsAutocompleteSuggestGroupBy', function (BULBS_AUTOCOMPLETE_EVENT_KEYPRESS) {
.directive('bulbsAutocompleteSuggestGroupBy', ['BULBS_AUTOCOMPLETE_EVENT_KEYPRESS', function (BULBS_AUTOCOMPLETE_EVENT_KEYPRESS) {
return {
restrict: 'E',
templateUrl: 'src/bulbs-autocomplete-suggest/bulbs-autocomplete-suggest-group-by/bulbs-autocomplete-suggest-group-by.html',
Expand Down Expand Up @@ -86,4 +86,4 @@ angular.module('BulbsAutocomplete.suggest.groupBy.directive', [])
});
}
};
});
}]);
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict';
angular.module('BulbsAutocomplete.suggest.directive', [])
.directive('bulbsAutocompleteSuggest', function (BULBS_AUTOCOMPLETE_EVENT_KEYPRESS) {
.directive('bulbsAutocompleteSuggest', ['BULBS_AUTOCOMPLETE_EVENT_KEYPRESS', function (BULBS_AUTOCOMPLETE_EVENT_KEYPRESS) {
return {
restrict: 'E',
templateUrl: 'src/bulbs-autocomplete-suggest/bulbs-autocomplete-suggest/bulbs-autocomplete-suggest.html',
Expand All @@ -18,7 +18,9 @@ angular.module('BulbsAutocomplete.suggest.directive', [])
case 13:
// enter
if (scope.selectedIndex !== -1) {
scope.onSelect({selection: scope.items[scope.selectedIndex]});
scope.onSelect({
selection: scope.items[scope.selectedIndex]
});
}
break;
case 38:
Expand All @@ -34,4 +36,4 @@ angular.module('BulbsAutocomplete.suggest.directive', [])
});
}
};
});
}]);
4 changes: 2 additions & 2 deletions src/bulbs-autocomplete/bulbs-autocomplete-factory.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'use strict';

angular.module('BulbsAutocomplete.factory', [])
.factory('BulbsAutocomplete', function () {
.factory('BulbsAutocomplete', [function () {

var BulbsAutocomplete = function (getItemsFunction) {
if (_.isFunction(getItemsFunction)) {
Expand All @@ -24,4 +24,4 @@ angular.module('BulbsAutocomplete.factory', [])
};

return BulbsAutocomplete;
});
}]);

0 comments on commit 34b474b

Please sign in to comment.