32 lines
3.7 KiB
HTML
32 lines
3.7 KiB
HTML
<html>
|
||
<head>
|
||
</head>
|
||
<body style="background: transparent;">
|
||
<script src="scripts/docstrap.lib.js"></script>
|
||
<script src="scripts/lunr.min.js"></script>
|
||
<script src="scripts/fulltext-search.js"></script>
|
||
|
||
<script type="text/x-docstrap-searchdb">
|
||
{"global.html":{"id":"global.html","title":"Global","body":" Documentation Global direrrorinfologFunctionoksuccesswarn Global Methods dir(logText) logs an directory to console Parameters: Name Type Description logText Returns: Type boolean error(logText) logs an error to console Parameters: Name Type Description logText Returns: Type boolean info(logText) logs an info to console Parameters: Name Type Description logText Returns: Type boolean logFunction(logText, logType) Parameters: Name Type Description logText logType Returns: Type boolean ok(logText) logs an 'OK!' message to console Parameters: Name Type Description logText Returns: Type boolean success(logText) logs a success to console Parameters: Name Type Description logText string to log as error Returns: Type boolean warn(logText) logs a 'warn:' message to console Parameters: Name Type Description logText string to log as error Returns: Type boolean × Search results Close Documentation generated by JSDoc 3.4.0 on 2016-04-04T22:36:17+02:00 using the DocStrap template. "},"index.html":{"id":"index.html","title":"Index","body":" Documentation Global direrrorinfologFunctionoksuccesswarn beautylogbeautiful logging Status Usage ### Simple Logging var bl = require('beautylog'); //for use in OS console environment AND browser console bl.log('some log message'); //normal console log message bl.success('some success message'); //success console log message bl.error('some error message'); //error console log message //alternatively you can use a logType parameter bl.log('some log message','normal'); bl.log('some success message','success'); bl.log('some error message','error');The plugin produces beautiful output like this: Code HighlightingConsole Tablesbeautylog allows displaying data in nice tables for better overview. There are different types of tables. Customvar bl = require('beautylog')("os"); //for use in OS console environment var myTable = bl.table.new("custom",["Heading1".blue,"Heading2".blue,"Heading3".blue]); // type "custom" myTable.push(["check 1","success"]); // adds a row the myTable myTable.push(["check 2","error"]); // adds a row the myTable myTable.push(["check 3","error"]); // adds a row the myTable myTable.print(); //prints myTable to the consoleChecksvar bl = require('beautylog')("os"); //for use in OS console environment var myTable = bl.table.new("checks"); // type checks myTable.push(["check 1","success"]); // adds a row the myTable myTable.push(["check 2","error"]); // adds a row the myTable myTable.push(["check 3","error"]); // adds a row the myTable myTable.print(); //prints myTable to the consoleThe table from the code with type "checks" above looks like this: × Search results Close Documentation generated by JSDoc 3.4.0 on 2016-04-04T22:36:17+02:00 using the DocStrap template. "}}
|
||
</script>
|
||
|
||
<script type="text/javascript">
|
||
$(document).ready(function() {
|
||
Searcher.init();
|
||
});
|
||
|
||
$(window).on("message", function(msg) {
|
||
var msgData = msg.originalEvent.data;
|
||
|
||
if (msgData.msgid != "docstrap.quicksearch.start") {
|
||
return;
|
||
}
|
||
|
||
var results = Searcher.search(msgData.searchTerms);
|
||
|
||
window.parent.postMessage({"results": results, "msgid": "docstrap.quicksearch.done"}, "*");
|
||
});
|
||
</script>
|
||
</body>
|
||
</html>
|