Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1d58aa38bd | ||
|
|
304f3801bd | ||
|
|
c87172ff1f | ||
|
|
c782b256c0 | ||
|
|
f78b0b6fb8 | ||
|
|
5c8feb571c |
@@ -1,8 +1,9 @@
|
||||
# smartdebug
|
||||
works with gulp, but does nothing. Use it to bootstrap your own gulp plugin with TypeScript, Travis and npm.
|
||||
debug your JavaScript the smart way
|
||||
|
||||
### Buildstatus/Dependencies
|
||||
[](https://travis-ci.org/pushrocks/smartdebug)
|
||||
[](https://david-dm.org/pushrocks/smartdebug)
|
||||
[](https://david-dm.org/pushrocks/smartdebug#info=devDependencies)
|
||||
|
||||
### Usage
|
||||
|
||||
8
index.js
8
index.js
@@ -8,8 +8,16 @@ var smartDebug = {
|
||||
beautylog.log("###DEBUG:###".rainbow + ' ' + message);
|
||||
}
|
||||
},
|
||||
run: function (functionArg) {
|
||||
if (debugActive) {
|
||||
functionArg();
|
||||
}
|
||||
},
|
||||
activate: function (debugArg) {
|
||||
debugActive = debugArg;
|
||||
},
|
||||
getStatus: function () {
|
||||
return debugActive;
|
||||
}
|
||||
};
|
||||
module.exports = smartDebug;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "smartdebug",
|
||||
"version": "0.0.5",
|
||||
"version": "0.0.8",
|
||||
"description": "debug your JavaScript the smart way",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
2
test.js
2
test.js
@@ -2,6 +2,8 @@
|
||||
var smartDebug = require("./index.js");
|
||||
var bl = require("beautylog")("os");
|
||||
smartDebug.log("This message is not shown");
|
||||
bl.log("debug.status() is " + smartDebug.getStatus());
|
||||
smartDebug.activate(true);
|
||||
smartDebug.log("This debug message is shown");
|
||||
bl.log("debug.status() is " + smartDebug.getStatus());
|
||||
bl.success("Test successfull");
|
||||
|
||||
@@ -9,8 +9,16 @@ var smartDebug = {
|
||||
beautylog.log("###DEBUG:###".rainbow + ' ' + message);
|
||||
}
|
||||
},
|
||||
run: function(functionArg) {
|
||||
if (debugActive) {
|
||||
functionArg();
|
||||
}
|
||||
}
|
||||
activate: function(debugArg:boolean){
|
||||
debugActive = debugArg;
|
||||
},
|
||||
getStatus: function(){
|
||||
return debugActive;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
@@ -3,7 +3,8 @@ var smartDebug = require("./index.js");
|
||||
var bl = require("beautylog")("os");
|
||||
|
||||
smartDebug.log("This message is not shown");
|
||||
bl.log("debug.status() is " + smartDebug.getStatus() );
|
||||
smartDebug.activate(true);
|
||||
smartDebug.log("This debug message is shown");
|
||||
|
||||
bl.log("debug.status() is " + smartDebug.getStatus() );
|
||||
bl.success("Test successfull");
|
||||
Reference in New Issue
Block a user