X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=node_modules%2Fgrunt-legacy-log%2Fexamples.js;fp=node_modules%2Fgrunt-legacy-log%2Fexamples.js;h=888ed8089dbc99d1055dffc1e24a7548144b2b23;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/node_modules/grunt-legacy-log/examples.js b/node_modules/grunt-legacy-log/examples.js new file mode 100644 index 000000000..888ed8089 --- /dev/null +++ b/node_modules/grunt-legacy-log/examples.js @@ -0,0 +1,26 @@ +var Log = require('./').Log; + +function doThings(options) { + console.log(); + console.log(options); + var log = new Log(options); + log.header("Header line."); + log.subhead("Subhead line."); + log.write("Testing").write(" 123...").writeln("done!"); + log.write("Verbose: ").verbose.write("YES").or.write("NO").always.write(", "); + log.notverbose.write("NO").or.write("YES").always.writeln("!"); + log.warn("This is a warning."); + log.write("Doing something...").warn(); + log.error("This is an error."); + log.write("Doing something...").error(); + log.ok("This is ok."); + log.write("Doing something...").ok(); + log.errorlns("This is a very long line in errorlns that should wrap eventually, given that it is a very long line."); + log.oklns("This is a very long line in oklns that should wrap eventually, given that it is a very long line."); + log.success("This is a success message."); + log.fail("This is a fail message."); + log.debug("This is a debug message."); +} + +doThings({}); +doThings({verbose: true});