Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c87172ff1f | ||
|
|
c782b256c0 | ||
|
|
f78b0b6fb8 | ||
|
|
5c8feb571c | ||
|
|
87411ef5a4 | ||
|
|
114fbe6425 | ||
|
|
33cf164aca |
@@ -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
|
||||
@@ -16,3 +17,5 @@ smartDebug.activate(true);
|
||||
smartDebug.log("This debug message is shown");
|
||||
```
|
||||
|
||||
The above code produces debug messages like this:
|
||||

|
||||
|
||||
3
index.js
3
index.js
@@ -10,6 +10,9 @@ var smartDebug = {
|
||||
},
|
||||
activate: function (debugArg) {
|
||||
debugActive = debugArg;
|
||||
},
|
||||
getStatus: function () {
|
||||
return debugActive;
|
||||
}
|
||||
};
|
||||
module.exports = smartDebug;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "smartdebug",
|
||||
"version": "0.0.3",
|
||||
"version": "0.0.7",
|
||||
"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");
|
||||
|
||||
@@ -11,6 +11,9 @@ var smartDebug = {
|
||||
},
|
||||
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