first commit
This commit is contained in:
23
build/node_modules/fancy-log/LICENSE
generated
vendored
Normal file
23
build/node_modules/fancy-log/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Blaine Bublitz <blaine.bublitz@gmail.com>
|
||||
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.
|
||||
|
||||
51
build/node_modules/fancy-log/README.md
generated
vendored
Normal file
51
build/node_modules/fancy-log/README.md
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
# fancy-log
|
||||
|
||||
[](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 the message as if you called `console.error` but prefixes the output with the
|
||||
current time in HH:MM:ss format.
|
||||
|
||||
### `log.warn(msg...)`
|
||||
|
||||
Logs the message as if you called `console.warn` but prefixes the output with the
|
||||
current time in HH:MM:ss format.
|
||||
|
||||
|
||||
### `log.info(msg...)`
|
||||
|
||||
Logs the message as if you called `console.info` but prefixes the output with the
|
||||
current time in HH:MM:ss format.
|
||||
|
||||
### `log.dir(msg...)`
|
||||
|
||||
Logs the message as if you called `console.dir` but prefixes the output with the
|
||||
current time in HH:MM:ss format.
|
||||
|
||||
## License
|
||||
|
||||
MIT
|
||||
72
build/node_modules/fancy-log/index.js
generated
vendored
Normal file
72
build/node_modules/fancy-log/index.js
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
'use strict';
|
||||
/*
|
||||
Initial code from https://github.com/gulpjs/gulp-util/blob/v3.0.6/lib/log.js
|
||||
*/
|
||||
var gray = require('ansi-gray');
|
||||
var timestamp = require('time-stamp');
|
||||
var supportsColor = require('color-support');
|
||||
|
||||
function hasFlag(flag) {
|
||||
return (process.argv.indexOf('--' + flag) !== -1);
|
||||
}
|
||||
|
||||
function addColor(str) {
|
||||
if (hasFlag('no-color')) {
|
||||
return str;
|
||||
}
|
||||
|
||||
if (hasFlag('color')) {
|
||||
return gray(str);
|
||||
}
|
||||
|
||||
if (supportsColor()) {
|
||||
return gray(str);
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
|
||||
function getTimestamp(){
|
||||
return '['+addColor(timestamp('HH:mm:ss'))+']';
|
||||
}
|
||||
|
||||
function log(){
|
||||
var time = getTimestamp();
|
||||
process.stdout.write(time + ' ');
|
||||
console.log.apply(console, arguments);
|
||||
return this;
|
||||
}
|
||||
|
||||
function info(){
|
||||
var time = getTimestamp();
|
||||
process.stdout.write(time + ' ');
|
||||
console.info.apply(console, arguments);
|
||||
return this;
|
||||
}
|
||||
|
||||
function dir(){
|
||||
var time = getTimestamp();
|
||||
process.stdout.write(time + ' ');
|
||||
console.dir.apply(console, arguments);
|
||||
return this;
|
||||
}
|
||||
|
||||
function warn(){
|
||||
var time = getTimestamp();
|
||||
process.stderr.write(time + ' ');
|
||||
console.warn.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.info = info;
|
||||
module.exports.dir = dir;
|
||||
module.exports.warn = warn;
|
||||
module.exports.error = error;
|
||||
84
build/node_modules/fancy-log/package.json
generated
vendored
Normal file
84
build/node_modules/fancy-log/package.json
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
"fancy-log@1.3.2",
|
||||
"/Users/asciidisco/Desktop/asciidisco.com/build"
|
||||
]
|
||||
],
|
||||
"_from": "fancy-log@1.3.2",
|
||||
"_id": "fancy-log@1.3.2",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha1-9BEl49hPLn2JpD0G2VjI94vha+E=",
|
||||
"_location": "/fancy-log",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "version",
|
||||
"registry": true,
|
||||
"raw": "fancy-log@1.3.2",
|
||||
"name": "fancy-log",
|
||||
"escapedName": "fancy-log",
|
||||
"rawSpec": "1.3.2",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "1.3.2"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/gulp-util"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.2.tgz",
|
||||
"_spec": "1.3.2",
|
||||
"_where": "/Users/asciidisco/Desktop/asciidisco.com/build",
|
||||
"author": {
|
||||
"name": "Blaine Bublitz",
|
||||
"email": "blaine.bublitz@gmail.com"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/js-cli/fancy-log/issues"
|
||||
},
|
||||
"contributors": [
|
||||
{
|
||||
"name": "Aman Mittal",
|
||||
"url": "http://amandeepmittal.github.io/"
|
||||
}
|
||||
],
|
||||
"dependencies": {
|
||||
"ansi-gray": "^0.1.1",
|
||||
"color-support": "^1.1.3",
|
||||
"time-stamp": "^1.0.0"
|
||||
},
|
||||
"description": "Log things, prefixed with a timestamp",
|
||||
"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"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 0.10"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/js-cli/fancy-log#readme",
|
||||
"keywords": [
|
||||
"console.log",
|
||||
"log",
|
||||
"logger",
|
||||
"logging",
|
||||
"pretty",
|
||||
"timestamp"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "index.js",
|
||||
"name": "fancy-log",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/js-cli/fancy-log.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "lab -cvL test.js"
|
||||
},
|
||||
"version": "1.3.2"
|
||||
}
|
||||
Reference in New Issue
Block a user