Skip to content

Commit bca5ce7

Browse files
author
Dean Sofer
committed
chore(refact): More folder restructuring
Still trying to figure things out.
1 parent 6dea2fb commit bca5ce7

File tree

8 files changed

+14
-19
lines changed

8 files changed

+14
-19
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
node_modules
2-
.idea
2+
.idea
3+
components

.gitmodules

Lines changed: 0 additions & 6 deletions
This file was deleted.

component.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
},
1111
"main": "./select2.js",
1212
"dependencies": {
13-
"jquery": ">= 1.8.0",
13+
"jquery": ">= 1.8.1",
1414
"angular": ">= 1.0.2",
1515
"select2": ">= 3.x.x"
1616
}

libs/angular.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

libs/select2

Lines changed: 0 additions & 1 deletion
This file was deleted.

select2.js renamed to src/ui-select2.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
* This change is so that you do not have to do an additional query yourself on top of Select2's own query
66
* @params [options] {object} The configuration options passed to $.fn.select2(). Refer to the documentation
77
*/
8-
angular.module('ui.select2', []).directive('uiSelect2', ['ui.config', '$timeout', function (uiConfig, $timeout) {
8+
angular.module('ui.select2', []).directive('uiSelect2', ['uiSelect2Config', '$timeout', function (uiSelect2Config, $timeout) {
99
var options = {};
10-
if (uiConfig.select2) {
11-
angular.extend(options, uiConfig.select2);
10+
if (uiSelect2Config) {
11+
angular.extend(options, uiSelect2Config);
1212
}
1313
return {
1414
require: '?ngModel',

tests/select2Spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// a helper directive for injecting formatters and parsers
2-
angular.module('ui.directives').directive('injectTransformers', [ function () {
2+
angular.module('ui.select2').directive('injectTransformers', [ function () {
33
return {
44
restrict: 'A',
55
require: 'ngModel',
@@ -22,7 +22,7 @@ describe('uiSelect2', function () {
2222
'use strict';
2323

2424
var scope, $compile, options, $timeout;
25-
beforeEach(module('ui.directives'));
25+
beforeEach(module('ui.select2'));
2626
beforeEach(inject(function (_$rootScope_, _$compile_, _$window_, _$timeout_) {
2727
scope = _$rootScope_.$new();
2828
$compile = _$compile_;

tests/test.conf.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@ basePath = '..';
22
files = [
33
JASMINE,
44
JASMINE_ADAPTER,
5-
'libs/angular.js/angular.js',
6-
'libs/select2/select2.js',
7-
'tests/*.js',
8-
'*.js'
5+
'components/jquery/jquery.js',
6+
'components/angular/angular.js',
7+
'components/angular-mocks/angular-mocks.js',
8+
'components/select2/select2.js',
9+
'src/*.js',
10+
'tests/*.js'
911
];
1012
runOnce = true;

0 commit comments

Comments
 (0)