Skip to content

Commit

Permalink
making it npm-able
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikJoreteg committed Aug 15, 2012
1 parent ccf1fab commit 0a70985
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
@@ -0,0 +1 @@
.DS_Store
11 changes: 9 additions & 2 deletions &log.js → andlog.js
@@ -1,7 +1,14 @@
// follow @HenrikJoreteg and @andyet if you like this ;) // follow @HenrikJoreteg and @andyet if you like this ;)
(function (window) { (function (window) {
var ls = window.localStorage, var ls = window.localStorage,
out = {}; out = {},
inNode = typeof process !== 'undefined';

if (inNode) {
module.exports = console;
return;
}

if (ls && ls.debug && window.console) { if (ls && ls.debug && window.console) {
out = window.console; out = window.console;
} else { } else {
Expand All @@ -18,4 +25,4 @@
} else { } else {
window.console = out; window.console = out;
} }
})(window); // make window a local var compression optimization. })(this); // make window a local var compression optimization.
5 changes: 5 additions & 0 deletions node-test.js
@@ -0,0 +1,5 @@
var logger = require("./&log");

logger.log("hellow");

console.log(logger);
11 changes: 11 additions & 0 deletions package.json
@@ -0,0 +1,11 @@
{
"name": "andlog",
"version": "0.0.2",
"author": "Henrik Joreteg <henrik@andyet.net>",
"description": "Super-simple, client-side CommonJS logging thingy",
"main": "andlog.js",
"repository": {
"type": "git",
"url": "git@github.com:HenrikJoreteg/andlog.git"
}
}

0 comments on commit 0a70985

Please sign in to comment.