aboutsummaryrefslogtreecommitdiff
path: root/node_modules/fancy-log
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/fancy-log')
-rw-r--r--node_modules/fancy-log/LICENSE23
-rw-r--r--node_modules/fancy-log/README.md35
-rw-r--r--node_modules/fancy-log/index.js27
-rw-r--r--node_modules/fancy-log/package.json40
4 files changed, 125 insertions, 0 deletions
diff --git a/node_modules/fancy-log/LICENSE b/node_modules/fancy-log/LICENSE
new file mode 100644
index 000000000..0dd44fbde
--- /dev/null
+++ b/node_modules/fancy-log/LICENSE
@@ -0,0 +1,23 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Blaine Bublitz
+Based on gulp-util, copyright 2014 Fractal <contact@wearefractal.com>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
+
diff --git a/node_modules/fancy-log/README.md b/node_modules/fancy-log/README.md
new file mode 100644
index 000000000..f3d227d05
--- /dev/null
+++ b/node_modules/fancy-log/README.md
@@ -0,0 +1,35 @@
+# fancy-log
+
+[![Travis Build Status](https://img.shields.io/travis/js-cli/fancy-log.svg?branch=master&label=travis&style=flat-square)](https://travis-ci.org/js-cli/fancy-log)
+
+Log things, prefixed with a timestamp
+
+__This module was pulled out of gulp-util for use inside the CLI__
+
+## Usage
+
+```js
+var log = require('fancy-log');
+
+log('a message');
+// [16:27:02] a message
+
+log.error('oh no!');
+// [16:27:02] oh no!
+```
+
+## API
+
+### `log(msg...)`
+
+Logs the message as if you called `console.log` but prefixes the output with the
+current time in HH:MM:ss format.
+
+### `log.error(msg...)`
+
+Logs ths message as if you called `console.error` but prefixes the output with the
+current time in HH:MM:ss format.
+
+## License
+
+MIT
diff --git a/node_modules/fancy-log/index.js b/node_modules/fancy-log/index.js
new file mode 100644
index 000000000..a9d972267
--- /dev/null
+++ b/node_modules/fancy-log/index.js
@@ -0,0 +1,27 @@
+'use strict';
+/*
+ Initial code from https://github.com/gulpjs/gulp-util/blob/v3.0.6/lib/log.js
+ */
+var chalk = require('chalk');
+var timestamp = require('time-stamp');
+
+function getTimestamp(){
+ return '['+chalk.grey(timestamp('HH:mm:ss'))+']';
+}
+
+function log(){
+ var time = getTimestamp();
+ process.stdout.write(time + ' ');
+ console.log.apply(console, arguments);
+ return this;
+}
+
+function error(){
+ var time = getTimestamp();
+ process.stderr.write(time + ' ');
+ console.error.apply(console, arguments);
+ return this;
+}
+
+module.exports = log;
+module.exports.error = error;
diff --git a/node_modules/fancy-log/package.json b/node_modules/fancy-log/package.json
new file mode 100644
index 000000000..73ed5d84c
--- /dev/null
+++ b/node_modules/fancy-log/package.json
@@ -0,0 +1,40 @@
+{
+ "name": "fancy-log",
+ "version": "1.2.0",
+ "description": "Log things, prefixed with a timestamp",
+ "author": "Blaine Bublitz <blaine@iceddev.com> (http://iceddev.com)",
+ "contributors": [],
+ "repository": "phated/fancy-log",
+ "license": "MIT",
+ "engines": {
+ "node": ">= 0.10"
+ },
+ "main": "index.js",
+ "files": [
+ "LICENSE",
+ "index.js"
+ ],
+ "scripts": {
+ "test": "lab -cvL test.js"
+ },
+ "dependencies": {
+ "chalk": "^1.1.1",
+ "time-stamp": "^1.0.0"
+ },
+ "devDependencies": {
+ "@phated/eslint-config-iceddev": "^0.2.1",
+ "code": "^1.5.0",
+ "eslint": "^1.3.1",
+ "eslint-plugin-mocha": "^0.5.1",
+ "eslint-plugin-react": "^3.3.1",
+ "lab": "^5.16.0"
+ },
+ "keywords": [
+ "console.log",
+ "log",
+ "logger",
+ "logging",
+ "pretty",
+ "timestamp"
+ ]
+}