Skip to content
This repository has been archived by the owner on Nov 30, 2018. It is now read-only.

Commit

Permalink
uiGmapLogger internals outsourced to nemSimpleLogger which we now ins…
Browse files Browse the repository at this point in the history
…tantiate
  • Loading branch information
nmccready committed Sep 3, 2015
1 parent 44810c3 commit 05af52c
Show file tree
Hide file tree
Showing 129 changed files with 113 additions and 4,326 deletions.
3 changes: 1 addition & 2 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ module.exports = (grunt) ->
'grunt-verbosity'
'grunt-webpack'
'grunt-angular-architecture-graph'
].forEach (gruntLib) ->
grunt.loadNpmTasks gruntLib
].forEach (gruntLib) -> grunt.loadNpmTasks gruntLib

#squishing this file done by moving grunt options out to its own file. This way we can focus on tasks!
options = require('./grunt/options')(grunt)
Expand Down
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
"main": "./dist/angular-google-maps.js",
"dependencies": {
"angular": "1.2 - 1.4",
"angular-simple-logger": "~0.0.1",
"lodash": ">=3.8.0"
},
"ignore":[
"ignore": [
"*.json",
".gitignore",
"travis.yml",
Expand Down
65 changes: 4 additions & 61 deletions dist/angular-google-maps-street-view.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/*! angular-google-maps 2.1.6 2015-08-31
/*! angular-google-maps 2.1.6 2015-09-03
* AngularJS directives for Google Maps
* git: https://github.com/angular-ui/angular-google-maps.git
*/
Expand Down Expand Up @@ -38,7 +38,7 @@ Nicholas McCready - https://twitter.com/nmccready
*/

(function() {
angular.module('uiGmapgoogle-maps.providers', []);
angular.module('uiGmapgoogle-maps.providers', ['nemLogging']);

This comment has been minimized.

Copy link
@caioiglesias

caioiglesias Nov 6, 2015

Contributor

I was linking from rawgit for a Plunkr but this one was a show stopper.

This comment has been minimized.

Copy link
@caioiglesias

caioiglesias Nov 6, 2015

Contributor

nevermind, just saw the updated docs! sorry!


angular.module('uiGmapgoogle-maps.wrapped', []);

Expand Down Expand Up @@ -163,65 +163,8 @@ return UUID;
}).call(this);
;(function() {
angular.module('uiGmapgoogle-maps.directives.api.utils').service('uiGmapLogger', [
'$log', function($log) {
var LEVELS, Logger, log, maybeExecLevel;
LEVELS = {
log: 1,
info: 2,
debug: 3,
warn: 4,
error: 5,
none: 6
};
maybeExecLevel = function(level, current, fn) {
if (level >= current) {
return fn();
}
};
log = function(logLevelFnName, msg) {
if ($log != null) {
return $log[logLevelFnName](msg);
} else {
return console[logLevelFnName](msg);
}
};
Logger = (function() {
function Logger() {
var logFns;
this.doLog = true;
logFns = {};
['log', 'info', 'debug', 'warn', 'error'].forEach((function(_this) {
return function(level) {
return logFns[level] = function(msg) {
if (_this.doLog) {
return maybeExecLevel(LEVELS[level], _this.currentLevel, function() {
return log(level, msg);
});
}
};
};
})(this));
this.LEVELS = LEVELS;
this.currentLevel = LEVELS.error;
this.log = logFns['log'];
this.info = logFns['info'];
this.debug = logFns['debug'];
this.warn = logFns['warn'];
this.error = logFns['error'];
}

Logger.prototype.spawn = function() {
return new Logger();
};

Logger.prototype.setLog = function(someLogger) {
return $log = someLogger;
};

return Logger;

})();
return new Logger();
'nemSimpleLogger', function(nemSimpleLogger) {
return nemSimpleLogger.spawn();
}
]);

Expand Down
5 changes: 0 additions & 5 deletions dist/angular-google-maps-street-view.min.js

This file was deleted.

65 changes: 4 additions & 61 deletions dist/angular-google-maps-street-view_dev_mapped.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/angular-google-maps-street-view_dev_mapped.js.map

Large diffs are not rendered by default.

Loading

0 comments on commit 05af52c

Please sign in to comment.