Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit 12c7e81

Browse files
committed
Merge pull request #321 from firebase/clean_up_dependencies
Cleaning up npm/bower dependencies and grunt tasks
2 parents 06d165b + 7fe6734 commit 12c7e81

File tree

8 files changed

+75
-101
lines changed

8 files changed

+75
-101
lines changed

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
bower_components/
22
node_modules/
3-
bower_components/
4-
selenium/
53
.idea

.jshintrc

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
{
2-
"bitwise" : true,
3-
"boss" : true,
4-
"browser" : true,
5-
"curly" : true,
6-
"devel" : true,
7-
"eqnull" : true,
8-
"globals" : {
9-
"angular" : false,
10-
"Firebase" : false,
11-
"FirebaseSimpleLogin" : false
12-
},
13-
"globalstrict" : true,
14-
"indent" : 2,
15-
"latedef" : true,
16-
"maxlen" : 115,
17-
"noempty" : true,
18-
"nonstandard" : true,
19-
"undef" : true,
20-
"unused" : true,
21-
"trailing" : true
22-
}
2+
"predef": [
3+
"angular",
4+
"Firebase",
5+
"FirebaseSimpleLogin"
6+
],
7+
"bitwise": true,
8+
"browser": true,
9+
"curly": true,
10+
"forin": true,
11+
"indent": 2,
12+
"latedef": true,
13+
"maxlen": 115,
14+
"noempty": true,
15+
"nonbsp": true,
16+
"strict": true,
17+
"trailing": true,
18+
"undef": true,
19+
"unused": true
20+
}

Gruntfile.js

Lines changed: 1 addition & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,7 @@ module.exports = function(grunt) {
4141
// Lint JavaScript
4242
jshint : {
4343
options : {
44-
'bitwise' : true,
45-
'boss' : true,
46-
'browser' : true,
47-
'curly' : true,
48-
'devel' : true,
49-
'eqnull' : true,
50-
'globals' : {
51-
'angular' : false,
52-
'Firebase' : false,
53-
'FirebaseSimpleLogin' : false
54-
},
55-
'globalstrict' : true,
56-
'indent' : 2,
57-
'latedef' : true,
58-
'maxlen' : 115,
59-
'noempty' : true,
60-
'nonstandard' : true,
61-
'undef' : true,
62-
'unused' : true,
63-
'trailing' : true
44+
jshintrc: '.jshintrc'
6445
},
6546
all : ['angularfire.js']
6647
},
@@ -115,13 +96,6 @@ module.exports = function(grunt) {
11596
message: 'Build Finished'
11697
}
11798
}
118-
},
119-
120-
// Auto-populating changelog
121-
changelog: {
122-
options: {
123-
dest: 'CHANGELOG.md'
124-
}
12599
}
126100
});
127101

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ Development
2121
[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/)
2222

2323
If you'd like to hack on AngularFire itself, you'll need
24-
[node.js](http://nodejs.org/download/), [Bower](http://bower.io), and
25-
[CasperJS](https://github.com/n1k0/casperjs).
24+
[node.js](http://nodejs.org/download/) and [Bower](http://bower.io).
2625

2726
You can also start hacking on AngularFire in a matter of seconds on
2827
[Nitrous.IO](https://www.nitrous.io/?utm_source=github.com&utm_campaign=angularFire&utm_medium=hackonnitrous)

angularfire.js

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@
99
// http://angularfire.com
1010
// License: MIT
1111

12-
"use strict";
13-
1412
(function() {
13+
"use strict";
1514

1615
var AngularFire, AngularFireAuth;
1716

@@ -41,7 +40,7 @@
4140
return function(input) {
4241
var sorted = [];
4342
if (input) {
44-
if (!input.$getIndex || typeof input.$getIndex != "function") {
43+
if (!input.$getIndex || typeof input.$getIndex !== "function") {
4544
// input is not an angularFire instance
4645
if (angular.isArray(input)) {
4746
// If input is an array, copy it
@@ -134,7 +133,7 @@
134133
child_removed: []
135134
};
136135

137-
if (typeof ref == "string") {
136+
if (typeof ref === "string") {
138137
throw new Error("Please provide a Firebase reference instead " +
139138
"of a URL, eg: new Firebase(url)");
140139
}
@@ -191,7 +190,7 @@
191190
}
192191
}
193192

194-
if (typeof item == "object") {
193+
if (typeof item === "object") {
195194
ref = self._fRef.ref().push(self._parseObject(item), _addCb);
196195
} else {
197196
ref = self._fRef.ref().push(item, _addCb);
@@ -307,7 +306,7 @@
307306
}
308307
},
309308
applyLocally);
310-
309+
311310
return deferred.promise;
312311
};
313312

@@ -490,7 +489,7 @@
490489
});
491490

492491
function _isPrimitive(v) {
493-
return v === null || typeof(v) !== 'object';
492+
return v === null || typeof(v) !== "object";
494493
}
495494

496495
function _initialLoad(value) {
@@ -527,7 +526,7 @@
527526
// child_* listeners attached; if the data suddenly changes between an object
528527
// and a primitive, the child_added/removed events will fire, and our data here
529528
// will get updated accordingly so we should be able to transition without issue
530-
self._fRef.on('value', function(snap) {
529+
self._fRef.on("value", function(snap) {
531530
// primitive handling
532531
var value = snap.val();
533532
if( _isPrimitive(value) ) {
@@ -539,7 +538,7 @@
539538
}
540539

541540
// broadcast the value event
542-
self._broadcastEvent('value', self._makeEventSnapshot(snap.name(), value));
541+
self._broadcastEvent("value", self._makeEventSnapshot(snap.name(), value));
543542

544543
// broadcast initial loaded event once data and indices are set up appropriately
545544
if( !self._loaded ) {
@@ -551,7 +550,7 @@
551550
// Called whenever there is a remote change. Applies them to the local
552551
// model for both explicit and implicit sync modes.
553552
_updateModel: function(key, value) {
554-
if (value == null) {
553+
if (value === null) {
555554
delete this._object[key];
556555
} else {
557556
this._object[key] = value;
@@ -622,7 +621,7 @@
622621
// If event handlers for a specified event were attached, call them.
623622
_broadcastEvent: function(evt, param) {
624623
var cbs = this._on[evt] || [];
625-
if( evt === 'loaded' ) {
624+
if( evt === "loaded" ) {
626625
this._on[evt] = []; // release memory
627626
}
628627
var self = this;
@@ -635,7 +634,7 @@
635634

636635
if (cbs.length > 0) {
637636
for (var i = 0; i < cbs.length; i++) {
638-
if (typeof cbs[i] == "function") {
637+
if (typeof cbs[i] === "function") {
639638
_wrapTimeout(cbs[i], param);
640639
}
641640
}
@@ -645,18 +644,18 @@
645644
// triggers an initial event for loaded, value, and child_added events (which get immediate feedback)
646645
_sendInitEvent: function(evt, callback) {
647646
var self = this;
648-
if( self._loaded && ['child_added', 'loaded', 'value'].indexOf(evt) > -1 ) {
647+
if( self._loaded && ["child_added", "loaded", "value"].indexOf(evt) > -1 ) {
649648
self._timeout(function() {
650-
var parsedValue = self._object.hasOwnProperty('$value')?
649+
var parsedValue = self._object.hasOwnProperty("$value")?
651650
self._object.$value : self._parseObject(self._object);
652651
switch(evt) {
653-
case 'loaded':
652+
case "loaded":
654653
callback(parsedValue);
655654
break;
656-
case 'value':
655+
case "value":
657656
callback(self._makeEventSnapshot(self._fRef.name(), parsedValue, null));
658657
break;
659-
case 'child_added':
658+
case "child_added":
660659
self._iterateChildren(parsedValue, function(name, val, prev) {
661660
callback(self._makeEventSnapshot(name, val, prev));
662661
});
@@ -710,7 +709,7 @@
710709

711710
// If the local model is an object, call an update to set local values.
712711
var local = self._parse(name)(scope);
713-
if (local !== undefined && typeof local == "object") {
712+
if (local !== undefined && typeof local === "object") {
714713
self._fRef.ref().update(self._parseObject(local));
715714
}
716715

@@ -720,9 +719,9 @@
720719
});
721720

722721
// Once we receive the initial value, the promise will be resolved.
723-
self._object.$on('loaded', function(value) {
722+
self._object.$on("loaded", function(value) {
724723
self._timeout(function() {
725-
if(value === null && typeof defaultFn === 'function') {
724+
if(value === null && typeof defaultFn === "function") {
726725
scope[name] = defaultFn();
727726
}
728727
else {
@@ -768,10 +767,10 @@
768767
function _findReplacePriority(item) {
769768
for (var prop in item) {
770769
if (item.hasOwnProperty(prop)) {
771-
if (prop == "$priority") {
770+
if (prop === "$priority") {
772771
item[".priority"] = item.$priority;
773772
delete item.$priority;
774-
} else if (typeof item[prop] == "object") {
773+
} else if (typeof item[prop] === "object") {
775774
_findReplacePriority(item[prop]);
776775
}
777776
}
@@ -822,7 +821,7 @@
822821
this._getCurrentUserDeferred = [];
823822
this._currentUserData = undefined;
824823

825-
if (typeof ref == "string") {
824+
if (typeof ref === "string") {
826825
throw new Error("Please provide a Firebase reference instead " +
827826
"of a URL, eg: new Firebase(url)");
828827
}

angularfire.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bower.json

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
{
22
"name": "angularfire",
3+
"description": "An officially supported AngularJS binding for Firebase.",
34
"version": "0.7.1",
4-
"main": ["./angularfire.js"],
5-
"ignore": ["Gruntfile.js", "package.js", "tests", "README.md", ".travis.yml"],
5+
"main": "angularfire.js",
6+
"ignore": [
7+
"Gruntfile.js",
8+
"bower_components",
9+
"node_modules",
10+
"package.json",
11+
"tests",
12+
"README.md",
13+
"LICENSE",
14+
".travis.yml",
15+
".jshintrc",
16+
".gitignore"
17+
],
618
"dependencies": {
719
"angular": "~1.2.0",
8-
"firebase": "~1.0.5",
9-
"firebase-simple-login": "~1.3.0"
20+
"firebase": "1.0.x",
21+
"firebase-simple-login": "1.6.x"
1022
},
1123
"devDependencies": {
12-
"angular-mocks" : "~1.2.0",
13-
"observe-js": "~0.1.4"
24+
"angular-mocks" : "~1.2.0"
1425
}
1526
}

package.json

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,35 @@
11
{
22
"name": "angularfire",
3-
"version": "0.7.1",
43
"description": "An officially supported AngularJS binding for Firebase.",
4+
"version": "0.7.1",
55
"main": "angularfire.js",
6+
"private": true,
67
"repository": {
78
"type": "git",
89
"url": "https://github.com/firebase/angularFire.git"
910
},
1011
"bugs": {
1112
"url": "https://github.com/firebase/angularFire/issues"
1213
},
14+
"dependencies": {
15+
},
1316
"devDependencies": {
1417
"grunt": "~0.4.1",
15-
"load-grunt-tasks": "~0.2.0",
16-
"grunt-contrib-uglify": "~0.2.2",
18+
"grunt-karma": "~0.6.2",
1719
"grunt-notify": "~0.2.7",
20+
"load-grunt-tasks": "~0.2.0",
21+
"grunt-shell-spawn": "^0.3.0",
1822
"grunt-contrib-watch": "~0.5.1",
19-
"grunt-contrib-jshint": "~0.6.2",
20-
"grunt-karma": "~0.6.2",
21-
"grunt-exec": "~0.4.2",
22-
"grunt-conventional-changelog": "~1.0.0",
23+
"grunt-contrib-jshint": "~0.10.0",
24+
"grunt-contrib-uglify": "~0.2.2",
2325
"grunt-contrib-connect": "^0.7.1",
24-
"grunt-shell-spawn": "^0.3.0",
2526
"grunt-protractor-runner": "^1.0.0",
27+
28+
"karma": "~0.10.4",
2629
"karma-jasmine": "~0.1.3",
27-
"karma-script-launcher": "~0.1.0",
28-
"karma-firefox-launcher": "~0.1.0",
29-
"karma-html2js-preprocessor": "~0.1.0",
30-
"karma-requirejs": "~0.2.0",
31-
"karma-coffee-preprocessor": "~0.1.0",
3230
"karma-phantomjs-launcher": "~0.1.0",
33-
"karma": "~0.10.4",
34-
"karma-chrome-launcher": "~0.1.0",
35-
"protractor": "^0.23.1",
36-
"lodash": "~2.4.1",
37-
"karma-safari-launcher": "~0.1.1",
38-
"firebase": "^1.0.15-3"
31+
32+
"firebase": "1.0.x",
33+
"protractor": "^0.23.1"
3934
}
4035
}

0 commit comments

Comments
 (0)